Try to learn Python basic first. It is much better that you learn how to code instead of someone is giving you the “result”
if you code loops in python then you can do it like this
for item in list:
do soemthing with the item...
if you need the index of an item, then do it like this
for index, item in enumerate(list):
do something with the list[index] or the item...
example if you have two lists of same length and you dont want to loop over two lists (a matter of RAM usage)
compare #a comparable item
list1 #list of item to search values in
list2 #list of values
for index, item in enumerate(list1):
if compare == item:
give me item in list2[index]