questions:
.TXT:
194220.00 38.4397984 S 061.1720742 W 0.035
194315.00 38.4398243 S 061.1721378 W 0.036
Python:
myList = ('38.4397984,061.1720742','38.4398243,061.1721378')
Answer questions. How to take floats from a txt to a Python list as strings
code:
with open('haha.txt') as f:
for line in f:
words = line.split()
print words
my_list.append(words[1] + words[3])
My test code doesn't produce the desired result. What is wrong with it? I am missing the ,
...
['38.4397984061.1720742', '38.4398243061.1721378']