You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

15 lines
387 B

import logging
import threading
import time
def thread_Apellido(name, inicio=1, fin=1):
for x in range(inicio, fin):
print (f"{name} Rodríguez {str(x)} años\n",end="")
nombres = ["Julio", "Javier", "Eladio", "Jose", "Manuel"]
hilos = list()
for n in nombres:
t = threading.Thread(target=thread_Apellido, args=(n,), kwargs={'inicio':5, 'fin':8})
hilos.append(t)
t.start()

Powered by Informatica FP.