Skip to content

Instantly share code, notes, and snippets.

@mpilar
Last active January 4, 2016 01:29
Show Gist options
  • Save mpilar/8548543 to your computer and use it in GitHub Desktop.
Save mpilar/8548543 to your computer and use it in GitHub Desktop.
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