Python Identifiers, Objects | Assignment Statement

3 Shares

In this article we will discuss about python Identifiers, Objects, and assignment statement. Here assignment statement is the most important python command, because it establishes an identifier associates it with the object. For example:

acceleration = 9.8

This python command establishes acceleration as an identifier associates it with the object (9.8). In this case for the assignment statement, 9.8 is the floating point object with the value 9.8. So, here behind the scene is, the identifier acceleration references an instance of float class having value 9.8.

Python Identifiers

Identifiers in python are case sensitive, therefore acceleration and Acceleration are two distinct names. We can use almost any combination of letters, numerals, and underscore character as Identifiers. The primary restrictions are that an identifier can not begin with numeral (thus 1atom is an illegal name), and also that there are 33 specially reserved words that can not be used as identifier. The semantics of a python identifier is most similar to a reference variable in Java or a pointer variable in C-plus-plus. So each identifier in python is implicitly associated with the memory address of the object to which it refers.

Python is a dynamically typed language, therefore there is no advance declaration associating an identifier with a particular data type.

Copy link
Powered by Social Snap