title: Python - run two commands at the same time
body: <p>I am new to Python and am having trouble with this piece of code:</p>
  
  <pre><code>while true:
     rand = random.choice(number)
     print(rand)             
     enter_word = input("Write something: ")
     time.sleep(5)
  </code></pre>
  
  <p>I want to be able to input words in the console while, <strong>at the same time</strong>, have random numbers appear in the console. But a new number only appears once I input a word. What is the best way to make both these commands run at the same time?</p>
  
  <p>Do I need to make a thread or is there something simpler I can do?
  And if I need to make a thread can you please give a little help on how I would create it?</p>
  
  <p>Thanks in advance</p>