What are the List of Python Keywords

By |2019-04-13T22:11:44+05:30March 29th, 2018|Python|

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 🙂

About the Author:

Hi Folks, you have reach this so far, that shows you like what you are learning. Then why don't you support us to improve for bettor tutorials by leaving your valuable comments and why not you keep in touch with us for latest updates on your favorite blog @ facebook , twitter , Or Google+ ,

Leave A Comment