Im trying to find the indexed version for multiple items in a list, such as
testarray = ["l","hello","l","l"]
for x in testarray:
if x == "l":
print(testarray.index(x))
I want the desired output to be 1, 3, 4
, but what I'm getting is 1,1,1