Home »
Python
Python Keywords
Last Updated : April 20, 2025
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
pass Statement
- yield
break
break Statement
- except
- import
print
print Function
- class
exec
- in
- raise
continue
continue Statement
- 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 Keywords Exercise
Select the correct option to complete each statement about Python keywords.
- The ___ keyword is used to define a function in Python.
- The ___ keyword is used to handle exceptions in Python.
- The ___ keyword is used to create a class in Python.
- The ___ keyword is used to end a loop or a function prematurely in Python.
Advertisement
Advertisement