經安全檢測,此網站為安全網站,請放心前往原始網址!

python - Parse String to Float or Int - Stack Overflow

In Python, how can I parse a numeric string like "545.2222" to its corresponding float value, 542.2222? Or parse the string "31" to an integer, 31? I just want to know how to parse a float string to a float, and (separately) an int string to an int.

stackoverflow.com

網址安全性掃描由 google 提供