[Solved] What’s going wrong with this prime-number output?


 for sub in range(2,int(sqrt(num))+1) :
    if num % sub ==0 :
        flag = False
        break
    print num , # <<-- this is inside the for loop and will be printed every iteration

1

solved What’s going wrong with this prime-number output?