I am trying to write a python function called legion that takes a list B and returns the indeces of all values in B that are greater than zero. So far I have
def legion(B):
for i in range(len(B)):
if (B[ i ]>0):
But am not sure if this is right or what to do next. For example if I have legion([3,3,4,0,0,8,2,0,0,5]) it should return ([0,1,2,5,6,9]) as these are in the indeces of the numbers in list B that are greater than 0.

def legion(B):
new_lst=[]
for i in range(len(B)):
if (B[i]>0):
new_lst.append(i)
return new_lst
list=legion([3,3,4,0,0,8,2,0,0,5])
print(list)
I am trying to write a python function called legion that takes a list B and...