print(int(5.5)) #to convert to int : output should be 5 print(float(5)) #to convert to float : output should be 5.0 ...
The typing spec currently says this: Python’s numeric types complex, float and int are not subtypes of each other, but to support common use cases, the type system contains a straightforward shortcut: ...