import threading def work(): print("Hello User") if __name__ == "__main__": thread = threading.Thread(target=work, name='thread-a') print("How are you?") thread.join()