Mofeoluwa

Untitled

Feb 22nd, 2020
167
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.29 KB | None | 0 0
  1. def same_index_value(list1,list2):
  2.     k = []
  3.     for i in range(0,len(list1)):
  4.         for j in range(0,len(list2)):
  5.             if list1[i] == list2[j]:
  6.                 f = list1[i]
  7.                 k = k.append(f)
  8.                 print(k)
  9. same_index_value(['a','b','c','d'],['c','b','a','d'])
Advertisement
Add Comment
Please, Sign In to add comment