def longest_common_prefix(seq1, seq2):
    """
    taken from https://www.quora.com/What-is-the-easiest-way-to-find-the-longest-common-prefix-or-suffix-of-two-sequences-in-Python
    :param seq1: first string 
    :param seq2: second string
    :return: the prefix
    """
    start = 0
    while start < min(len(seq1), len(seq2)):
        if seq1[start] != seq2[start]:
            break
        start += 1
    return seq1[:start]