June 2025
Intermediate to advanced
515 pages
17h 5m
English
Whenever you learn a new programming language, the first thing you must know are the keywords defined in that language. Keywords are the reserved words of a programming language. They have a specific meaning in the programming language definition and must therefore not be used as variable names in a program. Python has 35 keywords, which you can view by entering the following commands in the Python console:
>>> import keyword
>>> a=keyword.kwlist
>>> print(a)
You’ll receive the following output:
['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', ...
Read now
Unlock full access