I have a file where each line has a pair of coordinates like so:
[-74.0104294, 40.6996416]
The code that I'm using to read them in is:
with open('Manhattan_Coords.txt', 'r') as f:
mVerts = f.read().splitlines()
This reads in all 78 lines into a list, but it reads them in as strings, so when I print them out it shows up as:
['[(-74.0104294, 40.6996416]', ... , '[-74.0104294, 40.6996416]']
(Imagine the ... as 76 more coordinates like the first and last)
How can I read in each of these coordinate pairs as a list so that I am left with a list of 78 sublists with 2 floats inside each sublist?