1 2 3 4 5 6 7 8 9 10 11
""" Functions to generate complex random data. """ import random import string def random_string(length): """Generate a random string of length `length`.""" return "".join( random.choices( string.ascii_letters + string.digits, k=length))