Type Conversion - A quick interactive intro
Type Conversion - A quick interactive intro#
The name of the type is also a function that converts an object to that type (if possible). For instance, you can turn an integer to a float by doing float(5).
Convert a float to an integer. What does it do with the decimal part? (Try a few to be sure)
What kind of strings can be converted to int or float?