Python Keywords and Identifiers

 Python Keywords

Keywords are the reticent words in Python.

We can not use a keyword as a variable namefunction name or any different identifier. They're applied to define the syntax and edifice of the Python vocabulary.

In Python, keywords are case sensitive.

There are 33 keywords in Python3.7. This number can vary marginally over the course of time.

Python Identifiers

An identifier is a name given to realities like classfunctions, variables, etc. It helps to separate one reality from another.

Rules for writing identifiers:

1.Identifiers can be a combination of letters in lowercase (a to z) or uppercase (A to Z) or integers (0 to 9) or an underscore,. Names like myClass,var_1 andprint_this_to_screen, all are valid illustration.

2.An identifier can not start with a number. 1variable is invalid, but variable1 is a valid name.

3.Keywords can not be used as identifiers.
global = 1
Affair
Train"", line 1
global = 1
SyntaxError invalid syntax

4.We can not use special symbols like!,@,#,$,etc. in our identifier.
a@ = 0
Affair
Train"", line 1
. a@ = 0
SyntaxError

5.An identifier be of any length.



InsideAiml is the platform where you can learn each and every part of AI and Ml in one particular Web URL.identifiers in python is one of the part of machine learning which is in scope of future.

Comments

Popular posts from this blog

Tanh Activation Function

Sigmoid Activation Function And Its Uses.

Unleashing Creativity: The Latest Frontier of Animation AI