How to convert to float in Python

1 Answer

0 votes
print(float("-3.76e5"))

print(float("-3.76e2"))

print(float("903.678e2"))

print(float("12.87"))




'''
run:

-376000.0
-376.0
90367.8
12.87

'''

 



answered Aug 29, 2023 by avibootz
...