Advertisement
Blessing988

Untitled

Feb 21st, 2020
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.36 KB | None | 0 0
  1. def same_index_values(list1, list2):
  2.     index_list= [ ]
  3.     for number in list1 and list2:
  4.         if list1.index(number)==list2.index(number):
  5.             index_list.append(list1.index(number))
  6.     print(index_list)
  7.  
  8.  
  9. same_index_values(["a", "b", "c", "d"], ["c", "b", "a", "d"]) #Example (It must contain two arguments and the arguments must be lists)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement