thank u for help ... but im trying to learn threading i write this simple code but its not working its just run one function !!
code :
code :
import threading import time def qan(hey): while True: d = hey + 1 print d time.sleep(1) def printd(printme): while True: print printme + "\n" time.sleep(1) t1 = threading.Thread(target=qan, args=(1,)) t2 = threading.Thread(target=printd, args=("hey",)) t2.start() t1.start()can i know where is the problem in my code ?
Output:hey
2
2
hey
2hey
2