I have a list x = [2, 3, 3, 4, 5] and y = [10, 40, 50, 9, 7]. I want to print a list of indices for elements in x and y if x <= 3 and y => 30. So in this case it would be the pairs (3, 40) and (3, 50). Therefore I want a list of their indices as my output. So result = [1, 2].
I tried writing a for loop as follows:
result = []
for i in x, y:
if x <= 3 and y => 30:
result.append(enumerate(i))
print(result)