Last active
January 4, 2016 01:29
-
-
Save mpilar/8548543 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
import string | |
from random import sample | |
rand_strings = set() | |
string_count = 100 | |
string_len = 8 | |
string_prefix = "" | |
char_choices = string.uppercase + string.digits | |
while len(rand_strings) < string_count: | |
s = string_prefix + "".join(sample(char_choices, 8)) | |
rand_strings.add(s) | |
print s | |
# do wahtever with rand_srings |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment