If I have
list1 = [1, 2, 3, 6]
list2 = [4, 3, 5, 6]
how can I change the values of anything that matches between the two list? Only if the Index also matches
the desired output is
list1 = [1, 2, 3, 'match']
I was using this
for idx,x in enumerate(list1):
if x in list2:
list1[idx] = 'match'
But this replaces the 3 and the 6