Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
You need to use the built-in functions float() and int()
float() converts a string to a float
int() ... to an integer
The string object has built-in methods that can help determine what type of data it can be converted to.
Read the basics:
https://docs.python.org/3/library/functions.html
https://docs.python.org/3/library/stdtypes.html
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question