Given two list of integers, the task is to find the index at which the element of two list doesn’t match.
Input: Input1 = [1, 2, 3, 4] Input2 = [1, 5, 3, 6] Output: [1, 3] Explanation: At index=1 we have 2 and 5 and at index=3 we have 4 and 6 which mismatches.
Below are some ways to achieve this task.
Method #1: Using Iteration
Method #2: Using list Comprehension and zip
Method #3: Using Enumerate
- Python - Find the index of Minimum element in list
- Python | Find minimum of each index in list of lists
- Python program to sort a list of tuples by second Item
- Python | Inserting item in sorted list maintaining order
- Python | Add list elements with a multi-list based on index
- Python | Replace elements in second list with index of same element in first list
- Python | Sort list of list by specified index
- Python list | index()
- Python | Accessing index and value in list
- Python | Index of Non-Zero elements in Python list
- Python | Equate two list index elements
- Python | Returning index of a sorted list
- Python - K difference index pairing in list
- Python | Check for Nth index existence in list
- Python | Subgroups of i'th index size in list
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.