Advertisement
Guest User

Untitled

a guest
Feb 22nd, 2020
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.30 KB | None | 0 0
  1. def same_index_values(list1, list2):
  2.      result = []
  3.      for index, value in enumerate(list1, list2):
  4.          if {index} in list1 and {index} in list2:
  5.              result = result.append({value})
  6.              print(result)
  7.      return result
  8.  
  9.  
  10.  print(same_index_values([1, 2, 3, 4], [2, 4, 3, 1]))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement