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

assembly - What is the addressing mode for ld, add, and rjmp instructions? -

vowpalwabbit - Interpreting Vowpal Wabbit results: Why are some lines appended by "h"? -

ubuntu - Bash Script to Check That Files Are Being Created -