I am trying to convert a string into floating point in Python: I have the following Unicode string which I want to convert to 0.02 floating point:
t = (data["streams"][0]["time_base"])
print t
And this is the output u'1/50'
I am writing a program which is extracting information from a JSON file and in the future I will need to convert similar strings and I want to automate the process.
float(u'1/50')?