3 ms·
I wonder why the author left V and Y out of the source string? And of course, a Python equivalent: import string, random def gen_random_string(length=10):
by callahad 17y ago
I wonder why the author left V and Y out of the source string?
And of course, a Python equivalent:
import string, random
def gen_random_string(length=10):
chars = string.ascii_uppercase + string.digits
return ''.join(random.sample(chars, length))