Added ej02.py

This commit is contained in:
Dennis Eckerskorn 2024-10-15 17:45:42 +02:00
parent 338dbfc6c2
commit 8ddc5cf3f9
1 changed files with 16 additions and 0 deletions

16
ejercicios_hilos/ej02.py Normal file
View File

@ -0,0 +1,16 @@
import threading
import time
def escribePunto():
for i in range(100):
print (".", end="",flush=True)
time.sleep(0.1)
return
print ("INICIO")
t = threading.Thread(target=escribePunto)
t.start()
for i in range(50):
print ("-", end="",flush=True)
time.sleep(0.2)