# convert float to int
int(2.0) #output :2
string = "3.5"
#integer = int(string) will not work, as that returns an error.
integer = int(float(string)) #This will work, as you first turn "3.5" to 3.5
#then make it the integer 3
# Assuming x is an int
long(x)
# This can be done backwards, such as:
int(x)
# Keep in mind, if the long is to large for an int, it will be kept as a long.
# Another conversion includes:
float(x)
int(your_number)
# Method 1:
float_number = float (decimal_number)
# Method 2:
float_number = decimal_number * 1.0
a = 5
a = float(a) # int to float
floatNum = float(intNum)