how to turn the datatype of a variable to integer in python code example
Example 1: python convert character to integer
>>> chr(97)
'a'
>>> ord('a')
97
>>> int('1')
1
Example 2: convert float to int python
# convert float to int
x=3.1415
y=int(x)
print(y) #outputs 3