table of Contents
Built-in digital type method
Int int
Role: Define integer
Defined method: x = 10
Usage: arithmetic comparison operation
Integer immutable
x = 10
print(id(x))
x += 1
print(id(x))
Float
Role: Salary
Defined method: x = 10.1
Usage: arithmetic comparison operation
Immutable
x = 10.1
print(id(x))
x +=1
print(id(x))