Home »
Python
Python Keywords
Learn about the python keywords, what is the keyword in Python, list of the keywords in Python programming language.
By IncludeHelp Last updated : December 16, 2023
What are Python Keywords
Keywords are the reserved words in Python programming language (and, any other programming languages like C, C++, Java, etc) whose meanings are defined and we cannot change their meanings. In python programming languages, keywords are the case sensitive.
Note: We cannot use any reserved words (which are known as Keywords) as an identifier (like a variable name, function name, etc).
List of Python Keywords
Here is the list of Python keywords (the list can be varied based on the Python versions),
Keywords in Python 2.5
The following are the Keywords in Python 2.5:
- and
- del
- from
- not
- while
- as
- elif
- global
- or
- with
- assert
- else
- if
- pass
- yield
- break
- except
- import
- print
- class
- exec
- in
- raise
- continue
- finally
- is
- return
- def
- for
- lambda
- try
Keywords in Python 3.8.1
The following are the Keywords in Python 3.8.1:
- 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
Reference
Python Tutorial