def linear_search(c,b):
    """
    Returns index of first occurrence of c in b; -1 if not
    found.

    Parameter c: The value to search for
    Precondition: NONE (c can be any value)

    Parameter b: The sequence to search
    Precondition: b is a sequence
    """
    # Quick way to check if a sequence
    assert len(b) >= 0, repr(b)+' is a not a sequence (list, string, or tuple)'

    # Store in i the index of the first c in b[0..]
    i = len(b)-1
    while i >= 0 and b[i] != c:
        i = i - 1;

    if i >= 0:
        return i

    # NOT FOUND
    return -1