Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Python by (12.7k points)
I just want to know how to convert a string that contains digits to a doubt?

1 Answer

0 votes
by (26.4k points)

You can use float, try the following code:

>>> x = "2342.34"

>>> float(x)

2342.3400000000001

Want to become a expert in python? Join the python course fast!

Related questions

0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
Welcome to Intellipaat Community. Get your technical queries answered by top developers!

28.5k questions

29.9k answers

500 comments

99.1k users

Browse Categories

...