I have a csv file with columns id, name, address, phone. I want to read each row such that I store the data in two variables, key and data, where data contains name, address and phone. I want to do this because I want to append another column country in each row in a new csv. Can anyone help me with the code in python. I tried this but it didn't work:
dict = {}
reader = csv.reader(open('info.csv', 'r'))
for row in reader:
key, *data = row
dict[key] = ','.join(data)
key, *data = rowonly works in Python 3...