Python Keywords is a word having special meaning reserved by programming language
False | None | True | and | as |
assert | async | await | break | class |
continue | def | del | elif | else |
except | finally | for | from | global |
if | import | in | is | lambda |
nonlocal | not | or | pass | raise |
return | try | while | with | yield |
import keyword # if is predefine identifier so that ture print(keyword.iskeyword("if")) # super is not predefine identifier so that false print(keyword.iskeyword(super)) # import is predefine identifier so that true print(keyword.iskeyword("import")) # Ashutosh is predefine identifier so that false print(keyword.iskeyword("Ashutosh"))
True False True False