title: why isn't my python code using all of the cpu?
body: <p>i wrote a simple python code that just prints prime numbers nonstop but it only uses 25% percent of my laptops cpu (100% of a single core) .
  but i want it to use all of the cores. is that possible?
  BTW here is the code:</p>
  <pre class="lang-python prettyprint-override"><code>x = 10
  while True:
      for num in range(1, x):
          flag = False
          if x &gt; 1:
              for i in range(2, x):
                  if (x % i) == 0:
                      flag = True
                      break
          if not flag:
              print(x, &quot;is a prime number&quot;)
              break
      x += 1
  </code></pre>