Does anyone know a simple way to convert the given list into the desired format?
Given:
['[[2.1, 3.7], [5.5, -1.3]]']
Desired Format:
[[2.1, 3.7], [5.5, -1.3]]
Thanks in advance
Try this:
import ast
lst = ['[[2.1, 3.7], [5.5, -1.3]]']
ast.literal_eval(lst[0])
=> [[2.1, 3.7], [5.5, -1.3]]