Pad String with Spaces
Adds spaces to the beginning or end of strings until it reaches the maxlength. Used for aligning text.
pad_string(str, maxlength = 1, location = "beginning")
str
: stringmaxlength
: length to pad tolocation
: either "beginning"
to pad the left or "end"
to pad the rightPadded string
pad_string("bob", maxlength=10) pad_string("bob", maxlength=10, location="end")