Skip to content

Instantly share code, notes, and snippets.

@hirokiky
Created June 25, 2014 01:45
Show Gist options
  • Save hirokiky/38a09e2a3defa436fa46 to your computer and use it in GitHub Desktop.
Save hirokiky/38a09e2a3defa436fa46 to your computer and use it in GitHub Desktop.
Creating random 8 letter string constructed by alphanumeric.
#! /usr/bin/env python
import string
import random
alphanumeric = string.ascii_letters + string.digits
def main():
return ''.join([random.choice(alphanumeric) for _ in range(8)])
if __name__ in ('__main__', 'main'):
print(main())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment