def halfstr(s):
    """
    Split the given string, returning each half in a list.
    """
    length = len(s)
    half = length // 2
    if half * 2 != length:
        raise ValueError('string {0!r} not of even length'.format(s))
    return [s[:half], s[half:]]
