Created
June 25, 2014 01:45
-
-
Save hirokiky/38a09e2a3defa436fa46 to your computer and use it in GitHub Desktop.
Creating random 8 letter string constructed by alphanumeric.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /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