def justify(texts, max_len, mode='<STR_LIT:right>'):
if mode == '<STR_LIT:left>':<EOL><INDENT>return [x.ljust(max_len) for x in texts]<EOL><DEDENT>elif mode == '<STR_LIT>':<EOL><INDENT>return [x.center(max_len) for x in texts]<EOL><DEDENT>else:<EOL><INDENT>return [x.rjust(max_len) for x in texts]<EOL><DEDENT>
Perform ljust, center, rjust against string or list-like