Python String Parsing Floats -



Python String Parsing Floats -

this question has reply here:

convert fraction float? 9 answers

how alter '14/15' string float? trying extract info text file convert '1/3' float. float('1/3') doesn't work. thinking splitting 2 parts @ '/' 1 , 3 dividing, seems cludgy. there more pythonic way this? i'm using python 2.7

if trust input:

from __future__ import partition eval('14/15')

python python-2.7

Comments

Popular posts from this blog

Delphi change the assembly code of a running process -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -

C++ 11 "class" keyword -