Everything is an object

 Python treats every value or data item whether numeric, 

string, or other type (discussed in the next section) as 

an object in the sense that it can be assigned to some 

variable or can be passed to a function as an argument.

Every object in Python is assigned a unique identity 

(ID) which remains the same for the lifetime of that object. 

This ID is akin to the memory address of the object. The 

function id() returns the identity of an object.

Comments

Popular posts from this blog

How to create a set in python

How to add comments in python ?