Quiz Catalog

Catalog of quizzes

import threading

class A:
  def __init__(self, msg):
  self.msg = msg

  def say_hello(self):
  print(self.msg)

a = A('Hello, World')

th = threading.Thread(target=a.say_hello)

th.start()
th.join()
Hello, World
  • thread/parameter/target