I am preparing for my exam and I decided to start solving past exams. One of the requirements is to understand what a code does. But I am having troubles with this annotation.
I do not understand which the structure of this nested loop and which loop is executed first.
n = 10
p = [q for q in range(2, n) if q not in [r for i in range(2, int(n**0.5)) for r in range(i * 2, n, i)]]
print(p)
Can someone help me understand please?