Answer the question
In order to leave comments, you need to log in
Is it possible in python to make functions work at the same time?
Hello. How to make code run at the same time as other code. For example, in the code that I showed below, calls to the func_1 () function were simultaneously executed:
import time
def func_1(a):
print(a)
time.sleep(2)
func_1(a)
func_1(1)
func_1(2)
# Результат должен быть таким:
1
2
1
2
1
2
1
2
и т.д.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question