I wrote the following function:
def read_coordinates(filename):
invoerfile = open(filename)
lines = invoerfile.readlines()
for line in lines:
seperate_coordinate_rows = line.split("=")
for seperate_coordinate_row in seperate_coordinate_rows:
row = seperate_coordinate_row.split()
print row
which gives me these lists:
['5,4', '4,5', '8,7']
['6,3', '3,2', '9,6', '4,3']
['7,6']
['9,8']
['5,5', '7,8', '6,5', '6,4']
What do I need to add to this function to get lists with floats as output?
['7,6'], it should be[7.6]. Is this what you want? Or should it be[7,6]?