Preview:
#convert from int to float:
x = float(1)
​
#convert from float to int:
y = int(2.8)
​
#convert from int to complex:
z = complex(1)
​
print(x)
print(y)
print(z)
​
print(type(x))
print(type(y))
print(type(z))
​
downloadDownload PNG downloadDownload JPEG downloadDownload SVG

Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!

Click to optimize width for Twitter