Code help Python 3 (Loops)

https://www.codecademy.com/courses/learn-python-3/lessons/python-functions-loops-cc/exercises/same-index

# The function named same_values() needs to take 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.

def same_values(lst1,lst2):
  same_list = []
  for x in range(0,len(lst1)):
    for y in range(0,len(lst2)):
      if lst1[x] == lst2[y]:
        same_list.append(x)
  return same_list

print(same_values([5, 1, -10, 3, 3], [5, 10, -10, 3, 5]))

# should print [0, 2, 3]
# but my code prints [0, 0, 2, 3, 4]
# please help :(

hello! i kind of already solved my problem! i realized that since lst1 and lst2 needs to have the same number of parameters, i just did this, and yay! still, thanks :smiley:

here’s my working code now.

def same_values(lst1,lst2):
  same_list = []
  for x in range(0,len(lst1)):
      if lst1[x] == lst2[x]:
        same_list.append(x)
  return same_list

print(same_values([5, 1, -10, 3, 3], [5, 10, -10, 3, 5]))