Apples = 1
Oranges = 0
Bananas = 1
Grapes = 0
list1 = ["Apples", "Oranges", "Bananas", "Grapes"]
So in this example the locations should be 0 and 2.
>Solution :
Apples = 1
Oranges = 0
Bananas = 1
Grapes = 0
list1 = [Apples, Oranges, Bananas, Grapes]
y = len(list1)
for x in range(0,y):
if list1[x] == 1:
print (x)