PYTHON(DAY 3)
Today, we are going to learn about keywords in python.
KeyWords in python
Python keywords are unique words reserved with defined meanings and functions that we can only apply for those functions.
Python’s built-in methods and classes are not the same as the keywords. Built-in methods and classes are constantly present; however, they are not as limited in their application as keywords.
Assigning a particular meaning to Python keywords means you can’t use them for other purposes in our code. You’ll get a message of SyntaxError if you attempt to do the same.
Python contains thirty-three keywords
import keyword
print("The set of keywords in this version is: ")
print( keyword.kwlist )
By using, this kwlist we can display the list of keywords in python
No comments:
Post a Comment