Recents in Beach

Keywords in python

Previous                                                          Next⏩  

Python Keywords

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.
There are 35 keywords in Python 3.7. This number can vary slightly over the course of time.
All the keywords except TrueFalse and None are in lowercase and they must be written as they are. 
1. True : This keyword is used to represent a boolean true. If a statement is true, “True” is printed.
2. False : This keyword is used to represent a boolean false. If a statement is false, “False” is printed.
True and False in python are same as 1 and 0. 
3. None : This is a special constant used to denote a null value or a voidIts important to remember, 0, any empty container(e.g empty list) do not compute to None.
It is an object of its own datatype – NoneType. It is not possible to create multiple None objects and can assign it to variables.
The list of all the keywords is given below.

Python keywords have specific functions. They are used by the python interpreter to understand the code and execute them. There are 35 keywords in Python. The number will keep on growing with new features.


Previous                                                          Next⏩ 

Post a Comment

1 Comments