Générateur de lettres aléatoire Python
import random
import string
random.choice(string.ascii_letters)
Doubtful Dingo
import random
import string
random.choice(string.ascii_letters)
import random
import string
def random_string_generator(size=10, chars=string.ascii_lowercase + string.digits):
return ''.join(random.choice(chars) for _ in range(size))
print(random_string_generator())
print(random_string_generator(size=50))
from random import randint
def create_random_chars(nbr_of_chars):
return "".join(chr(randint(33,126)) for i in range(nbr_of_chars))
print(create_random_chars(10))
# I1CU>E5q;$