Keywords

BrandonDusch's avatar
Published Apr 23, 2022
Contribute to Docs

Certain keywords are reserved in Python and are not available to be assigned as variables or named functions. There are many keywords where some specialize in control-flow (e.g. if/else and for) while others work as operators (e.g. and, in, and is).

Keywords

assert
Confirms the truthiness of a given statement.
class
Used for defining classes in Python.
del
Removes an object from the namespace of a Python shell or environment.
global
Creates a global variable that can be updated.
lambda
Produces an anonymous function expression.

All contributors

Contribute to Docs

Learn Python on Codecademy