I am trying read a file and split a cell in each line by a comma and then display only the first and the second cells which contain information regarding the latitude and th
The problem is that readlines is a list of strings, each of which is a line of filename. Perhaps you meant:
readlines
filename
for line in readlines: Type = line.split(",") x = Type[1] y = Type[2] print(x,y)