- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How can I parse a numeric string to its corresponding float value?
Python’s number conversion function float() converts an integer to float with fractional part as 0. It also parses a string with valid representation of float number to a float object.
>>> float('1.11') 1.11 >>> float(1) 1.0 >>> float('1') 1.0 >>> float('1.1e-2') 0.011
Advertisements