Source Code:
(back to article)
import random import string def generate_random_string(length): return ''.join(random.sample(string.ascii_uppercase + string.digits, k=length)) # Example print(generate_random_string(8))
Result:
Report an issue