I have the following string mydata
that in fact is an embedded list of lists:
u'[[[1.7594271439650333, 41.82815539277221], [1.7594360823099031,41.82815010753548], [1.7594365489105126,41.828102229437455], [1.75943006926896,41.82809815273617], [1.7593938715967752,41.8280981826361], [1.75938821767524, 41.828104309113314], [1.759388051589258, 41.8281507714983], [1.7594271439650333, 41.82815539277221]]]
I want to convert it to a list of tuples as follows:
mytuple = [tuple(l) for l in mydata[0]]
But it does not work since mydata
is indeed a string.