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 | Replace elements in second list with index of same element in first list
- Python | Add list elements with a multi-list based on index
- Python | Sort list of list by specified index
- Python list | index()
- Python - Index Value Summation List
- Python - Every Kth index Maximum in List
- Python | Accessing index and value in list
- Python | Check for Nth index existence in list
- Python | Subgroups of i'th index size in list
- Python | Returning index of a sorted list
- Python | Equate two list index elements