I want to fill out a string with spaces. I know that the following works for zero's:
>>> print "'%06d'"%4
'000004'
But what should I do when I want this?:
'hi '
of course I can measure string length and do str+" "*leftover
, but I'd like the shortest way.
Question&Answers:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…