Sign up to request clarification or add additional context in comments.
Comments
1
If I have well understood, you want to print w spaces.
You could do something like : print(f"{s:<{w}}{s}")
Else, there is also the method ljust :
print(s.ljust(w, " ")+s)
print(f" {s:<{w}}{s}")?printinstead ofprintf?