I want to fill out a string with spaces. I know that the following works for zero\'s:
>>> print \"\'%06d\'\"%4 \'000004\'
But wha
Use Python 2.7's mini formatting for strings:
'{0: <8}'.format('123')
This left aligns, and pads to 8 characters with the ' ' character.