In this question, he actually asked something like what I want. Except that the answer was to remove the parentheses. However if I remove the parentheses, then I'll not be able to pass arguments for my functions.
How can I do the following simple code without waiting:
from time import sleep
import threading
def whatever(i):
sleep(5)
print("Hey! It's me number " + str(i))
for i in range(3):
t = threading.Thread(target=whatever(i))
t.start()
Desired output would be
Hey! It's me number 0
Hey! It's me number 1
Hey! It's me number 2
All printed at the same time