Assume /tmp/example.csv
.
import csv
defmain():
with open("/tmp/example.csv", 'r') asf:
reader=csv.reader(f)
dic = {}
For row in reader:
k = row.pop(0)
v=row
dic[k] = v
print(dic)
if__name__=="__main__":
main()
© 2024 OneMinuteCode. All rights reserved.