def is_sublist(l1, l2, pos=False):
    """
    Check if l1 is a sublist of l2 (it contains all elements from l1 in the same order).

    if pos is True, return position where sublist starts, not a boolean value
    """
    if l1 == []:
        return 0 if pos else True
    elif l1 == l2:
        return 0 if pos else True
    elif len(l1) > len(l2):
        return -1 if pos else False

    for i in range(len(l2)):
        if l2[i] == l1[0]:
            n = 1
            while (n < len(l1)) and (i + n < len(l2)) and (l2[i + n] == l1[n]):
                n += 1

            if n == len(l1):
                return i if pos else True
    return -1 if pos else False