Skip to content

Instantly share code, notes, and snippets.

@samarthbhargav
Last active August 29, 2015 14:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save samarthbhargav/959ab91942ce1e8d1e77 to your computer and use it in GitHub Desktop.
Save samarthbhargav/959ab91942ce1e8d1e77 to your computer and use it in GitHub Desktop.
import string
import random
def append_random(existing_str, length):
while len(existing_str) != length:
existing_str += string.letters[:26][random.randint(0,26)]
return existing_str
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment