Error de atributo: el objeto 'list' no tiene atributo 'split'
Estoy intentando leer un archivo y dividir una celda en cada línea por una coma y luego mostrar solo la primera y la segunda celda que contienen información sobre la latitud y la longitud. Este es el archivo:
hora,latitud longitud, tipo2015-03-20T10: 20: 35.890Z,38.8221664, -122.7649994, terremoto2015-03-20T10: 18: 13.070Z,33.2073333, -116.6891667, terremoto2015-03-20T10: 15: 09.000Z,62.242, -150.8769,terremoto
Mi programa:
def getQuakeData():
filename = input("Please enter the quake file: ")
readfile = open(filename, "r")
readlines = readfile.readlines()
Type = readlines.split(",")
x = Type[1]
y = Type[2]
for points in Type:
print(x,y)
getQuakeData()
Cuando intento ejecutar este programa, me da un error
"AttributeError: el objeto 'list' no tiene el atributo 'split'
¡Por favor, ayúdame!