They're all listed in the keyword module:
>>> import keyword
>>> keyword.kwlist
['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']
(output as of Python 3.11)
From the keyword.kwlist doc:
Sequence containing all the keywords defined for the interpreter. If any keywords are defined to only be active when particular
__future__statements are in effect, these will be included as well.
The built-in functions are in a module called __builtins__, so:
dir(__builtins__)
0 down vote favorite 1
I know there is a keywords list called kwlist in python\Lib\keyword.py but only the basic keywords are there like if print and is and so on... but there is no len raw_input and all the error names.
So my question is: where can I find the full python's keywords list?
thanks.
len and raw_input aren't keywords, they're builtin functions.
These are the built in functions. But it is not clear what you are asking for:
https://docs.python.org/3/library/functions.html
Here is python key words:
https://www.programiz.com/python-programming/keyword-list
.