diff options
| author | drbaggy <js5@sanger.ac.uk> | 2021-12-07 00:04:16 +0000 |
|---|---|---|
| committer | drbaggy <js5@sanger.ac.uk> | 2021-12-07 00:04:16 +0000 |
| commit | 913c79f9179e9dc662d64dac73cc7c41e3b84ca7 (patch) | |
| tree | 02f08e092ab0343a644fa2a13a4e800d8b281f69 /challenge-142/eric-cheung/python | |
| parent | 35e89da28fa5acf448dde4127c093031888e2fde (diff) | |
| parent | 54620721cb174feca58d62f153c204d26b0297f7 (diff) | |
| download | perlweeklychallenge-club-913c79f9179e9dc662d64dac73cc7c41e3b84ca7.tar.gz perlweeklychallenge-club-913c79f9179e9dc662d64dac73cc7c41e3b84ca7.tar.bz2 perlweeklychallenge-club-913c79f9179e9dc662d64dac73cc7c41e3b84ca7.zip | |
git isn't good at handling merges - worse than SVN by a long way
Diffstat (limited to 'challenge-142/eric-cheung/python')
| -rwxr-xr-x | challenge-142/eric-cheung/python/ch-2.py | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/challenge-142/eric-cheung/python/ch-2.py b/challenge-142/eric-cheung/python/ch-2.py new file mode 100755 index 0000000000..bc6bf07135 --- /dev/null +++ b/challenge-142/eric-cheung/python/ch-2.py @@ -0,0 +1,19 @@ +## Sleep Sort (For Positive Numbers)
+## Credit: https://gist.github.com/armorasha/47c7236cdfe25a928080692324d7f035
+## Credit: https://iq.opengenus.org/sleep-sort/
+## Python 3
+
+import _thread
+from time import sleep
+
+arrItem = [2, 4, 5, 2.5, 1, 7]
+
+def FuncSleepSort(nNum):
+ sleep(nNum)
+ print(nNum)
+
+
+for nItem in arrItem:
+ argItem = (nItem,)
+ _thread.start_new_thread(FuncSleepSort, argItem)
+
|
