I'm using a list and checking this against information held in a csv file. I'm trying to do it one list item at a time, however after the initial iteration the nested for loop doesn't seem to run.
I've used the initial For loop so the entire loop will run the number of iterations equal to the number of items in the list. The inner for loop then runs for the number of rows in the csv file. The very inner If statements then does stuff if the list item matches the information in the CSV row.
with open('MY_PATH', encoding="utf8") as csv_file:
csv_reader = csv.reader(csv_file, delimiter=',')
line_count = 2
for i in range(0, len(class_numbers)):
for row in csv_reader:
if obj_list[i]['name'] in row[1]:
audiofile = '{}.mp3' .format(row[0][0:8])
#audio = fetch_file(audiofile)
print(row[1],'-' , audiofile)
line_count += 1
else:
line_count += 1
#print('error')