Created
December 16, 2014 11:40
-
-
Save philippbosch/2cffb96c0a02b51fa9bf to your computer and use it in GitHub Desktop.
Create random string in Python
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
import random | |
import string | |
length=10 | |
code = ''.join(random.choice(string.ascii_uppercase + string.digits) for _ in range(length)) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment