def x_in_y(query, base):
    """Checks if query is a subsequence of base"""
    try:
        l = len(query)
    except TypeError:
        l = 1
        query = type(base)((query,))
    for i in range(len(base)):
        if base[i:i+l] == query:
            return True
    return False