Reserved keywords

Reserved keywords

Reserved keywords:

In Python, reserved words are predefined keywords that have a specific meaning and cannot be used as identifiers (variable names, function names, etc.) because they are already used by the Python language itself. Here are the reserved words in Python:

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

You cannot use any of these words as variable names, function names, or any other identifier name in your Python code. If you do use a reserved word as an identifier, you will get a syntax error when you try to run your code.

Join To Get Our Newsletter
Spread the love