Using a simple example we get the equivalent shown here:
x = [ 2, 3, 4, 7, 11 ]
z = [j for i in x for j in range(len(x)) if i == x[j]]
print(z)
zzz = []
for i in x:
for j in range(len(x)):
if i == x[j]:
zzz.append(j)
print(zzz)
And the output is:
[0, 1, 2, 3, 4]
[0, 1, 2, 3, 4]