I have two lists: the first one loaded from a file and the second one created by the user through input. I want to compare whether the list item provided by the user is exactly the same as the corresponding item from the first list. It is important that it is about checking carefully whether there are identical elements under the same index in both lists. Sample code (of course, in fact, these lists are much longer):
word = ['red', 'orange', 'blue', 'white']
answer_user = ['black', 'orange', 'blue', 'green']
for i in answer_user:
for j in word:
if i == j:
print('good answer')
else:
print('bad answer')
With such code, it multiplies my iteration and it does not work and I do not know how to make it compare only an element to an element from both lists ...