So I just started learnig how to code and I've been studying from the guide on the official python website and I came across this subject but I don't quite understand how this code works can someone explain it to me please?
for n in range(2, 10):
for x in range(2, n):
if n % x == 0:
print(n, 'equals' , x, '*' , n//x)
break
else:
print(n, 'is a prime number')
This loop searches for prime numbers