Python Reserved Keywords
When naming variables in Python the following names are not allowed because they are keywords of the Python language. This list contains all 36 keywords of Python 3.10:
False | break | for | not |
None | class | from | or |
True | continue | global | pass |
__peg_parser__ | def | if | raise |
and | del | import | return |
as | elif | in | try |
assert | else | is | while |
async | except | lambda | with |
await | finally | nonlocal | yield |
1
2
import keyword
print(keyword.list)