Organizing information in the file
(City, City, Distance)
import csv
with open('cidades.csv', 'r') as f:
list1 = [tuple(line.values()) for line in csv.DictReader(f)]
for i in list1:
x=(list1[i])
print(distancia=x[2])
To access index 3, of the tuples I copied to the list, and write to a variable?