How would I start sorting this list so that it displays the names of the countries in order, determined by the conversion rate (it involves reading data from a text file)? I want it to display only the name of the countries, and not the exchange rate. Additionally, I'm a novice, so the simpler answer the more helpful and the better I can understand/learn. I'm not sure if I'd call this a list or a dictionary.
America,Dollar,1
Argentina,Peso,8.257
Australia,Dollar,1.432
Austria,Euro,0.82
I have a general idea about how to start, but I don't know what to do from here. Here's what I have so far:
fhand = open('Exchange.txt')
for line in fhand:
line = line.split(',')
print line[0]
The outputs should be something like:
Austria
Australia
America
Argentina