For data storage purposes I am trying to recover lists of floats from a .txt file. From the string like:
a = \'[1.3, 2.3, 4.5]\'
I want to recover:<
You could use json
json
import json a = '[1.3, 2.3, 4.5]' json.loads(a)