def Trie ( S ) : T = None for w in S : T = add ( T , w ) return T
create a trie with a words python
: param S : set of words : returns : trie containing all words from S : complexity : linear in total word sizes from S
def Trie(S):
    """
    :param S: set of words
    :returns: trie containing all words from S
    :complexity: linear in total word sizes from S
    """
    T = None
    for w in S:
        T = add(T, w)
    return T