I am new to Python and am having problems with this piece of code:
while true: rand = random.choice(number) print(rand) enter_word = input("Write something: ") time.sleep(5)
I want to be able to enter words in the console, and at the same time , random numbers appear in the console. But the new number appears only after entering the word. What is the best way to get both of these commands working at the same time?
Do I need to create a stream or is there something simpler that I can do? And if I need to make a thread, can you please work a little bit on how I will create it?
Thanks in advance
source share