aboutsummaryrefslogtreecommitdiff
path: root/gn3/random.py
blob: f0ba5741d6207ed0b89d600a10c361ee3ea69b9e (plain)
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))