Created
August 27, 2012 17:00
-
-
Save 013231/3490375 to your computer and use it in GitHub Desktop.
This file contains 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
allNum = range(1000*1000) | |
random.shuffle(allNum) | |
for promoCodeNeverRepeat in allNum: | |
doSomethingWith(promoCodeNeverRepeat) | |
def getCode(): | |
result = allNum[getCode.usedNum] | |
getCode.usedNum += 1 | |
return result | |
getCode.usedNum = 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment