Skip to content

Instantly share code, notes, and snippets.

@JoseHdez2
Last active January 29, 2020 16:02
Show Gist options
  • Save JoseHdez2/7bb29ecaf9141d755c96dec77b005e55 to your computer and use it in GitHub Desktop.
Save JoseHdez2/7bb29ecaf9141d755c96dec77b005e55 to your computer and use it in GitHub Desktop.
import random
import string
# https://pynative.com/python-generate-random-string/
def randomString(stringLength=10):
"""Generate a random string of fixed length """
letters = string.ascii_lowercase
return ''.join(random.choice(letters) for i in range(stringLength))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment