Categories
How to continue to execute if there is an infinite loop?
a = 0 while True: a = a+1 #код ниже не будет выполняться b = Input("?")
Answer the question
In order to leave comments, you need to log in
(replace dots with spaces) Use threads i.e. import threading a = 0 def foo(): ....while True: ........ a += 1 if __name__ == "__main__": ... .threading.Thread(target=foo, args=(), daemon=False) ....# Your code ....b = Input("?")
Didn't find what you were looking for?
Ask a Question
731 491 924 answers to any question