Python keyword

Python keyword

  • Keywords are the reserved words in Python. 

  • We cannot use a keyword as a variable name, function name or any other identifier. 

  • They are used to define the syntax and structure of the Python language. 

  • In Python, keywords are case sensitive.

Python keywords list

  • The following is a list of keywords for the Python programming language.  

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

Python is a dynamic language. It changes during time. The list of keywords may change in the future.

 

Comments