Skip to content

Instantly share code, notes, and snippets.

@ghl3
Created September 7, 2013 05:46
Show Gist options
  • Select an option

  • Save ghl3/6473103 to your computer and use it in GitHub Desktop.

Select an option

Save ghl3/6473103 to your computer and use it in GitHub Desktop.
Random String
import random
import string
def random_string():
N = random.randint(1, 10)
return ''.join(random.choice(string.ascii_letters + string.digits) for x in range(N))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment