<qiyuangong>014_Longest_Common_Prefix_1.py
def longestCommonPrefix( strs):
    ls = len(strs)
    if ls == 1:
        return strs[0]
    prefix = ''
    pos = 0
    while True:
        try:
            current = strs[0][pos]
        except IndexError:
            break
        index = 1
        while index < ls:
            try:
                if strs[index][pos] != current:
                    break
            except IndexError:
                break
            index += 1
        if index == ls:
            prefix = prefix + current
        else:
            break
        pos += 1
    return prefix
def sample_funcname ( var_0 ) :
    var_2 = len ( var_0 )
    if var_2 == 1 :
        return var_0 [ 0 ]
    var_6 = ''
    var_7 = 0
    while True :
        try :
            var_9 = var_0 [ 0 ] [ var_7 ]
        except IndexError :
            break
        var_11 = 1
        while var_11 < var_2 :
            try :
                if var_0 [ var_11 ] [ var_7 ] != var_9 :
                    break
            except IndexError :
                break
            var_11 += 1
        if var_11 == var_2 :
            var_6 = var_6 + var_9
        else :
            break
        var_7 += 1
    return var_6
