Write a program to compare two equal sized lists and print the first index where they differ.

Опубликовано: 25 Октябрь 2024
на канале: Portal Express
370
15

Write a program to compare two equal sized lists and print the first index where they differ.


Website Link :-
https://www.pathwalla.com


Answer =

lst1 = eval(input("Enter first list :-"))
lst2 = eval(input("Enter second list :-"))
for i in range(len(lst1)):
if lst1[i] != lst2[i] :
print(i)