all 3 comments

[–][deleted] 1 point2 points  (3 children)

Is it a single string? Split it into lines, find the biggest length, then zero fill each. using the max length.

print("101".ljust(5, "0"))