Created
May 30, 2014 14:24
-
-
Save nohe427/41dd85069c9e0048a400 to your computer and use it in GitHub Desktop.
uniqueRandomNumbers
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import random | |
L = [0] | |
def nohe(x): | |
global L | |
x = 0 | |
while x in L: | |
x = random.choice(range(1, 361)) | |
L.append(x) | |
return x |
Author
nohe427
commented
Nov 25, 2015
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment