-2
Hello, this would be the solution you are looking for?
import threading
import time
def printar_um():
for x in range(0, 5):
print("\nprintar_um")
time.sleep(1.0)
def printar_dois():
for x in range(0, 5):
print("\nprintar_dois")
time.sleep(1.0)
def run_thread(job_function):
job_thread = threading.Thread(target=job_function)
job_thread.start()
if __name__ == "__main__":
run_thread(job_function=printar_um)
run_thread(job_function=printar_dois)
I could not play the error. I tried it on Linux and Windows and the result was the same
c
enter
– Augusto Vasques
Never mind I figured out how to do it; Just put more than one function inside another function.
– Estudante Python