Skip to content

Instantly share code, notes, and snippets.

@VITIMan
Created August 10, 2017 13:32
Show Gist options
  • Save VITIMan/5dcfc6703ed52b6fb17f046bbe7c1b5c to your computer and use it in GitHub Desktop.
Save VITIMan/5dcfc6703ed52b6fb17f046bbe7c1b5c to your computer and use it in GitHub Desktop.
Snippets using random library
import random
import string
def _random_string(N, chars=string.ascii_uppercase + string.digits):
""" To generate values from a set of chars and a given length
"""
return ''.join(random.choice(chars) for _ in range(N))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment