1import random
2import string
3
4def get_random_alphanumeric_string(length):
5 letters_and_digits = string.ascii_letters + string.digits
6 result_str = ''.join((random.choice(letters_and_digits) for i in range(length)))
7 print("Random alphanumeric String is:", result_str)
8
9get_random_alphanumeric_string(8)
10get_random_alphanumeric_string(8)
11
1# -random letter generator-
2import string
3var1 = string.ascii_letters
4
5import random
6var2 = random.choice(string.ascii_letters)
7print(var2)