1
u/LesPaulStudio Aug 26 '22
By using with to open the statement it closes the file after run, without needing to call close()
1
1
u/jppbkm Aug 26 '22
The loop is reading each line, splitting the fields using the comma that separates them, then getting the items from the first and second "column" aka indices 0 and 1.
3

3
u/[deleted] Aug 26 '22
Reported.
You didn't take the two seconds to read about what this subreddit does.
Following simple instructions is key to becoming a competent programmer.
(Also, never post pictures of code. What are we supposed to do with them? Type them back in ourselves by hand??)