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

14 lines
289 B
Python

# Создание потока
from threading import Thread
class PrintThread(Thread):
def __init__(self, name):
super().__init__()
self.name = name
def run(self):
print(f"hello {self.name}")
th = PrintThread("Mike")
th.start()
th.join()