Python Keywords
Python Keywords:
● In Python, the reserved words are called "keywords". They define Python's syntax and structure. Keywords in Python are case sensitive. All of the keywords are lowercase except True, False, and None.
● Python 3.10.1 has 35 keywords.
'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'
Python program that prints the complete list of keywords
● Variable-related keywords include the following:
'global', 'nonlocal'
● Functions-related keywords include the following:
'def', 'lambda', 'return', 'with', 'yield'
● Class-related keywords include the following:
'class'
● Constants-related keywords include the following:
'True', 'False', 'None'
● Flow controls-related keywords include the following:
'if', 'else','elif', 'for', 'break', 'continue', 'pass', 'while'
● Module-related keywords include the following:
'import', 'from', 'as'
● Logical-related keywords include the following:
'and', 'or', 'not'
● Checking-related keywords include the following:
'in', 'is'
● Exception handling-related keywords include the following:
'try', 'except', 'finally', 'raise', 'assert'
● Asynchronous-related keywords include the following:
'async', 'await'
● Delete-related keywords include the following:
'del'