Python рассчитывает первичные числа до числа
until = 20
[n for n in range(2, until) if all(n % m != 0 for m in range(2, n-1))]
Upset Unicorn
until = 20
[n for n in range(2, until) if all(n % m != 0 for m in range(2, n-1))]
until=20
[n for n in range(2,until) if all(n%m !=0 for m in range (2,n-1))]