Sep-24-2022, 08:14 PM
Replacing "spaces" is an exercise left to the reader. I would read about the str datatype and what methods it supports. I bet there is a method for padding a string to some width. I'd also do some research on f'string formatting. There is a way to set the width of a string when it is printed. Very useful for printing out tables and having the columns line up. There is also an operator that you can use on strings to make a longer string by concatenating a short string some multiple number of times.