<doocs>1324.Print Words Vertically_1.py
def printVertically( s: str) -> List[str]:
    words = s.split()
    m, n = len(words), max(len(word) for word in words)
    ans = []
    for j in range(n):
        t = []
        for i in range(m):
            word = words[i]
            t.append(word[j] if j < len(word) else ' ')
        ans.append(''.join(t).rstrip())
    return ans
def sample_funcname ( var_0 : str ) -> List [ str ] :
    var_4 = var_0.split ( )
    var_6 , var_9 = len ( var_4 ) , max ( len ( var_8 ) for var_8 in var_4 )
    var_10 = [ ]
    for var_12 in range ( var_9 ) :
        var_13 = [ ]
        for var_14 in range ( var_6 ) :
            var_8 = var_4 [ var_14 ]
            var_13.append ( var_8 [ var_12 ] if var_12 < len ( var_8 ) else '' )
        var_10.append ( ''.var_18 ( var_13 ).rstrip ( ) )
    return var_10
