r/pythonhelp • • Apr 27 '20

Help me out, why does this only print the last line of text in my csv file (there are 4 lines)

Post image
3 Upvotes

2 comments sorted by

2

u/someoneonboard1 Apr 27 '20

Missing tab on line 27? mydict is out of your for loop. Its weird saying that.

1

u/[deleted] May 17 '20

Lol I wish more people were in this sub to appreciate this comment.

I’d look into openpyxl which allows you to read and write excel files. I find it much easier to create dictionaries that way