Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/python3
- import time
- from threading import Thread
- #peculiar sort algorithm
- class Number:
- def sort(self,unsort):
- self.unsort=unsort
- for n in unsort:
- sorthread = Thread(target=Number().timer, args=(n,))
- sorthread.start()
- def timer(self,num):
- time.sleep(num)
- print("Number: ",num)
- num = [3,5,6,9,1,8,2,7]
- Number().sort(num)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement