Keywords and functions
Keywords are reserved words that cannot be used as variable names. The following table gives the list of keywords and their purpose:
Keywords | Explanation |
| Boolean false value:
|
| Boolean true value:
|
| Logical operator that returns True only if both the operands are True or evaluates to True:
|
| Creates an alias for a module that is being imported:
|
| Used to evaluate a logical expression to check values of variables at runtime and raises an AssertionError if the expression evaluates to False:
The preceding assert keyword raises an AssertionError. |
| Used to exit a loop such as forloop or while loop when a condition is met. |
| Keyword that indicates a class declaration. |
| Indicates the interpreter to move to the next iteration in a for or while loop without executing the code in the... |