image
image
image

Namespace and Scope in Python

image

The identifier is simply a named object. Python handles every item as an object.

Example

Start IDLE.

Navigate to the File menu and click New Window.

Type the following:

number=3

print(id(3)=‘, id(3))

print(‘id(number)=’, id(number))

Note: Both are referring to the same object.