While reading the CSV file in these lines:
csv_file = open(sys.argv[1], "r") # reading the csv file into memory
csv_reader = csv.DictReader(csv_file)
When I tried to make a copy of the csv_reader while using the for loop it worked, but any changes to that copy version affected the csv_reader variable, plus
for line in csv_reader:
copy = line
break
for line in csv_reader:
print(line)
the second for loop will print everything except for the first line in thencsv_file, why?