New course! Every coder should learn Generative AI!
Try a free lesson0
In Python 3 there are 33 keywords.
You can see the list of keywords using this code:
https://code.sololearn.com/cgI4ZABs7bOh/?ref=app
Moreover, you can test if a string is a keyword by importing keyword module and doing this:
keyword.iskeyword("your_string")
which will return True if your_string is a reserved identifier and False if it isn't.