def _subsequence(s, c):
    """
    Takes as parameter list like object s and returns the length of the longest
    subsequence of s constituted only by consecutive character 'c's.
    Example: If the string passed as parameter is "001000111100", and c is '0',
    then the longest subsequence of only '0's has length 3.
    """

    count = 0      # current length of the sequence of zeros
    maxlen = 0     # temporary value of the maximum length

    for bit in s:
        if bit == c:            # we have read a new '0'
            count += 1          # update the length of the current sequence
            if count > maxlen:  # if necessary, update the temporary maximum
                maxlen = count
        else:                   # we have read a 1
            count = 0           # reset the length of the current sequence
    return maxlen