<doocs>1002.Find Common Characters_1.py
def commonChars( words: List[str]) -> List[str]:
    freq = [10000] * 26
    for word in words:
        t = [0] * 26
        for c in word:
            t[ord(c) - ord('a')] += 1
        for i in range(26):
            freq[i] = min(freq[i], t[i])
    res = []
    for i in range(26):
        if freq[i] > 0:
            res.extend([chr(i + ord("a"))] * freq[i])
    return res
def sample_funcname ( var_0 : List [ str ] ) -> List [ str ] :
    var_5 = [ 10000 ] * 26
    for var_6 in var_0 :
        var_8 = [ 0 ] * 26
        for var_9 in var_6 :
            var_8 [ ord ( var_9 ) - ord ( 'a' ) ] += 1
        for var_14 in range ( 26 ) :
            var_5 [ var_14 ] = min ( var_5 [ var_14 ] , var_8 [ var_14 ] )
    var_16 = [ ]
    for var_14 in range ( 26 ) :
        if var_5 [ var_14 ] > 0 :
            var_16.extend ( [ chr ( var_14 + ord ( "a" ) ) ] * var_5 [ var_14 ] )
    return var_16
