Answers for "Generate random strings only with uppercase letters and digits in Python"

0

Generate random strings only with uppercase letters and digits in Python

import string
import random
def gen_random_string(leng):
    random_list=[]
    for i in range(leng):
        random_list.append(random.choice(string.ascii_uppercase + string.digits))
    return(''.join(random_list))
print(gen_random_string(9))<div class="open_grepper_editor" title="Edit & Save To Grepper"></div>
Posted by: Guest on December-21-2021

Code answers related to "Generate random strings only with uppercase letters and digits in Python"

Code answers related to "Assembly"

Browse Popular Code Answers by Language