Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def same_index_values(list1, list2):
- result = []
- for index, value in enumerate(list1, list2):
- if {index} in list1 and {index} in list2:
- result = result.append({value})
- print(result)
- return result
- print(same_index_values([1, 2, 3, 4], [2, 4, 3, 1]))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement