import random


def random_string(length):
    """Return a random string of the given length with each character
    from the printable ASCII range.
    """
    result = ""
    for _ in range(length):
        result += chr(random.randint(33, 126))
    return result