is this the best way of doing it?

if not how can i improve it?

this returns the indices which match but before all that it checks which list is smaller and uses that as the range

```
def same_values(lst1,lst2):
index = []
length = range(len(lst1))
length2 = range(len(lst2))
if len(lst1) <= len(lst2):
for i in length:
if lst1[i] == lst2[i]:
index.append(i)
return index
else:
for i in length2:
if lst1[i] == lst2[i]:
index.append(i)
return index
```