<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def lcp(s1, s2):
    '''longest common prefix

    >>> lcp('abcdx', 'abcdy'), lcp('', 'a'), lcp('x', 'yz')
    (4, 0, 0)
    '''
    i = 0
    for i, (c1, c2) in enumerate(zip(s1, s2)):
        if c1 != c2:
            return i
    return min(len(s1), len(s2))