Python Keywords and Identifiers
Here I published the 3rd part of the consecutive series about Python Programming language to learn for all. Please check the previous…
Here I published the 3rd part of the consecutive series about Python Programming language to learn for all. Please check the previous parts.

Each Programming language has its own syntax and structure . To define these syntaxes and structure reserved words are used. Python Programming language is no exception. There are 35 keywords in Python 3.8, each serving a different meaning for a different purpose.
Every keyword is a part of the vocabulary of the Python Programming language. So we can’t use these keywords for defining names of variables, classes or functions.
Python keywords are case sensitive, which means they must be written as they are while we using them in our code.
To get the keywords list, open Python IDLE (windows) and type “help()” and hit enter. Type “keywords”, voila! you can see now the whole python keywords list.

We can also use Python’s keyword module to get the list.

To know about a specific keyword and its usage, type its name on the help mode and hit enter.

Example of keyword :
Using “while” keyword we can run a loop in a code block for displaying the values of a variable.
a = 12 while a>3: print(a) a -= 1
Type on your Python IDLE and see.

Python Identifiers
When we assign a name to a variable, function, class, module or any other programmable entity, then it is called an identifier.
Python language has a set of rules to create identifiers.
Rules:
A valid identifier can only have a combination of letters either in lowercase(a to z) or uppercase(A to Z) or digits(0 to 9) or underscore (__).
num, num1, num_1, numTwo are valid identifiers example.The name of an identifier can’t start with a digit. For example:
1num is not a valid identifier name, but num1 is a valid one.Keywords can’t be used as valid identifiers’ names.
Avoid special characters [‘$’, ‘%’, ‘.’, ‘@’, ‘!’ ] for naming a valid identifier.
A valid identifier can have an unlimited length of the sequence of the characters.
we should aware that Python language is case sensitive. So, the identifier ‘name’ and ‘Name’ are not the same.
………………………………….
I hope that dear readers understand what has been discussed so far about today’s topic.
Originally published at https://hive.blog on April 14, 2020.