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 minimum of each index in list of lists
- Python - Find the index of Minimum element in list
- Python program to sort a list of tuples by second Item
- Python | Inserting item in sorted list maintaining order
- Python | Replace elements in second list with index of same element in first list
- Python | Add list elements with a multi-list based on index
- PyQt5 - Adding item at given index in ComboBox
- PyQt5 - Change the item at specific index in ComboBox
- PyQt5 - Getting the content of item at specific index in ComboBox
- PyQt5 - Getting the current index of selected item in ComboBox
- Python | Sort list of list by specified index
- Python list | index()
- Python | Accessing index and value in list
- Python - Index Value Summation List
- Python - Every Kth index Maximum in List