Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

convert mixed number string to float

from fractions import Fraction
float(sum(Fraction(s) for s in '1 2/3'.split()))
Source by www.py4u.net #
 
PREVIOUS NEXT
Tagged: #convert #mixed #number #string #float
ADD COMMENT
Topic
Name
4+3 =