title: print function not working in python3
body: <pre><code>import threading 
  
  
  class PrimeNumber(threading.Thread): 
    def __init__(self, number): 
      threading.Thread.__init__(self) 
      self.Number = int(number)
  
    def run(self): 
      counter = 2 
      while counter*counter &lt;= self.Number: 
          if self.Number % counter == 0: 
              promptLock.acquire()
              if(prompt):print()
              print( "%d is not prime number" % ( self.Number) )
              if(prompt):print("number: ",end="")
              promptLock.release()
              return 
          counter += 1 
      promptLock.acquire()
      if(prompt): print()
      print ("%d is a prime number" % self.Number)
  
      #strange line
      debug_line = 1
      if(debug_line==1):
          if(prompt):print("number: ",end="")
      if(debug_line==2):
          if(prompt):print("number: ")
  
      promptLock.release()
  
  threads = [] 
  prompt=False
  promptLock = threading.Lock()
  
  def promptlocker():
      global prompt
      promptLock.acquire()
      prompt = not prompt
      promptLock.release() 
  
  
  while True: 
      promptlocker()
      print("number: ",end="")
      input1 = int(input())
      promptlocker()
      if input1 &lt; 1: 
          break 
      thread = PrimeNumber(input1) 
      threads += [thread] 
      thread.start() 
  
  for x in threads: 
      x.join()
  </code></pre>
  
  <p>I am using this code to test threading in python3 <br/>
  if i give an input 1000000099999963 and then 55 <br/>
  as first input is lengthy and time consuming 
  so it will be calculated in new thread and till then there will be a prompt to ask for new input , and then we can add new input and if it is easier to calculate then it with easily be calculated and printed .
  and then when thread to calculate large number is finished then it will print its output .<br/>
  so now i want that if code was asking for a number i.e. <b>prompt</b> is <b>True</b> then i want to print "number : " again .<br/>
  i want output to be <br/></p>
  
  <pre><code>number: 1000000099999963
  number: 55
  55 is not prime number
  number: 
  1000000099999963 is a prime number
  number:  
  </code></pre>
  
  <p>but the output is </p>
  
  <pre><code>number: 1000000099999963
  number: 55
  55 is not prime number
  number: 
  1000000099999963 is a prime number
  </code></pre>
  
  <p>when debug_line is set to 1 , dont know why the line</p>
  
  <pre><code>if(prompt):print("number: ",end="")
  </code></pre>
  
  <p>is not working </p>
  
  <p>if i set debug_line to 2 , then the line will work</p>
  
  <pre><code>if(prompt):print("number: ")
  </code></pre>