[u'10.57518117688789', u'43.17174576695126', u'0 10.57512669810526', u'43.17172389657181', u'0 10.57509460784044', u'43.17169116727101', u'0']
I need to turn this into a list of latitudes and longitudes that are in order from 1st to last. The first element being latitude and the second being longitude. I don't need the u or the '0'.
Right now, I'm just printing them, but this method needs to return a list of coordinates in order.
def get_coord_list_from_earth(filename):
filename = str(filename)
data = xml.dom.minidom.parse(filename)
coordinates = data.getElementsByTagName('coordinates')[0].firstChild.nodeValue
coordinates = coordinates.strip()
print coordinates.split(',')
I need it to output a list of lists like this.
[10.57518117688789, 43.17174576695126], [10.57512669810526, 43.17172389657181], [10.57509460784044, 43.17169116727101]
This link is to a sample file this would need to run with