import random


def random_str(length):
    """Returns a random mixed case string of length provided."""

    def _random_chr():
        if random.randint(0, 1):
            return chr(random.choice(range(65, 91)))
        else:
            return chr(random.choice(range(97, 122)))
    return "".join([_random_chr() for _ in range(length)])