+
+
+def generate_padded_columns(text: List[str]) -> str:
+ max_width = defaultdict(int)
+ for line in text:
+ for pos, word in enumerate(line.split()):
+ max_width[pos] = max(max_width[pos], len(word))
+
+ for line in text:
+ out = ""
+ for pos, word in enumerate(line.split()):
+ width = max_width[pos]
+ word = justify_string(word, width=width, alignment='l')
+ out += f'{word} '
+ yield out