turtle-graphics

Attribute Error: 'list' object has no attribute 'split'

老子叫甜甜 提交于 2019-11-26 12:57:40
问题 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 the longitude. This is the file: time, latitude,longitude ,type2015-03-20T10:20:35.890Z, 38.8221664,-122.7649994 ,earthquake2015-03-20T10:18:13.070Z, 33.2073333,-116.6891667 ,earthquake2015-03-20T10:15:09.000Z, 62.242,-150.8769 ,earthquake My program: def getQuakeData(): filename = input(\"Please enter the quake file: \")