title: What's going wrong with this prime-number output?
body: <pre><code>from math import sqrt
  
  for num in range(2,100) :
      flag = True
      for sub in range(2,int(sqrt(num))+1) :
          if num % sub ==0 :
              flag = False
              break
          print num ,
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/3NLnn.png" alt="This is the output, repeated numbers"></p>
  
  <p>I am a "brand" newbie in python, I try code to output the prime number from 2 to 100, and I 
  encountered some question, please help me  ^^ </p>