Last active
June 29, 2021 08:24
-
-
Save alpden550/fa3a853ceab2384eaccda0e8cadff8ac to your computer and use it in GitHub Desktop.
Generate random ending for names.
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 | |
def generate_random_string(length=20, allowed_symbols=None): | |
allowed_symbols = allowed_symbols or string.ascii_letters + string.digits | |
return ''.join(random.sample(allowed_symbols, length)) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment