Keywords in Python
Link will be apear in 15 seconds.
Well done! you have successfully gained access to Decrypted Link.
•
Keywords define the language’s rules
and structure and they can’t be used as variable names.
•
Python
has twenty-nine keywords:
and
def exec if
not
return
assert del
finally import or try
break elif for
in pass
while
class else
from is print yield
continue
except global
lambda raise
To check whether a string is keyword or
not :
Python in
its language defines an inbuilt module “keyword” which handles certain
operations related to keywords. A function “iskeyword()” checks if
a string is keyword or not. Returns true if a string is keyword, else
returns false.
>>>
import keyword
>>>
keyword.iskeyword("true")
False