Learning Scientific Programming with Python (2nd edition)
E2.4: Python's type and id built-ins
The data type and memory address of the object referred to by a variable name can be found with the builtins type
and id
:
>>> type(a)
<class 'float'>
>>> id(area)
4298539728 # for example