Skip to content
Advertisement

Tag: text-alignment

Align strings over a common character

I am looking for a simple, pythonic way of doing this with the minimum calculations and loops. I have a bunch of strings, such as: What I would like to print at the screen is: (where the x are actually spaces, but I could not figure out how to show it with this editor) I am aware of string formatting

Advertisement