Skip to Content
Learn
Code Challenge: Loops
Same Values

same_values(lst1, lst2)

Instructions

1.

Write a function named same_values() that takes two lists of numbers of equal size as parameters.

The function should return a list of the indices where the values were equal in lst1 and lst2.

For example, the following code should return [0, 2, 3]

same_values([5, 1, -10, 3, 3], [5, 10, -10, 3, 5])
Folder Icon

Sign up to start coding

Already have an account?