Python

What are the List of Python Keywords

In this tutorials, we will see the list of Python Keywords. In Python some words are reserved to represent some meaning of functionality, such type of words are called as Python keywords or Python reserved words.

Python keywords:

There are 33 keywords available in Python.

  • True, False, None
  • and, or, not, is
  • if, elif, else
  • while,for, break, continue, return, in, yield
  • try, except, finally, raise, assert
  • import, from, as, class, def, pass, global, nonloccal, lambda, del, with

Note :

  • All keywords in python contains only alphabet symbols.
  • Except True, False, None keywords, remaining all keywords are containing lower case alphabet symbols.
  • All python keywords are case sensitive i.e True is not equalled to true.

We can see the all list of keywords in python by giving the below command on python shell.

>>> keyword.kwlist
['False', 'None', 'True', 'and', 'as', 'assert', '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']

Happy Learning :)

Found a mistake or something out of date? Tell us →

Written by

chandrashekhar

Founder of onlinetutorialspoint.com. Enterprise architect with 15+ years in healthcare technology, designing and running systems on AWS and Azure. Writes about building real things with AI, local AI hardware and cloud certifications.

Keep reading

Ask a question or leave a comment