def split_sequence(s, f):
    """Puts item into first list if f(item), else in second list"""
    a = []
    b = []
    for item in s:
        if f(item):
            a.append(item)
        else:
            b.append(item)
    return a, b
