Answer the question
In order to leave comments, you need to log in
How to "not wait" for input from the user in python?
I want to do something like this:
while True:
while (s = input()):
...
do_smthing1
...
...
do_smthing2
...
Answer the question
In order to leave comments, you need to log in
from threading import Thread
def worker():
while True:
do_smthing2()
Thread(target=worker).start()
while True:
s = input()
do_smthing1()
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question