Home >>Python Programs >Python program to print the list of all keywords
In this example, we will see a Python program through which we can print the list of all the keywords
For printing the list of all the keywords we will use the "keyword.kwlist" that can be used after importing the "keyword" module. It returns a list of all the keyword available in the current Python version.
Program:
# Python program to print the list of all keywords
# importing the module
import keyword
# printing the keywords
print("Python keywords are...")
print(keyword.kwlist)