Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import threading
- from time import sleep
- def one():
- while True:
- print 'ello'
- sleep(2)
- def two():
- while True:
- raw_input()
- t1 = threading.Thread(target=one)
- t2 = threading.Thread(target=two)
- t1.start()
- t2.start()
- t1.join()
- t2.join()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement