Python génère la taille de chaîne aléatoire du nombre n

''.join(random.choice(string.ascii_uppercase + string.digits) for _ in range(N))
Strange Salmon