Apr-09-2020, 02:18 PM
(This post was last modified: Apr-09-2020, 02:19 PM by deanhystad.)
from https://docs.python.org/2/library/string.html
Aligning the text and specifying a width: >>> '{:<30}'.format('left aligned') 'left aligned ' >>> '{:>30}'.format('right aligned') ' right aligned' >>> '{:^30}'.format('centered') ' centered ' >>> '{:*^30}'.format('centered') # use '*' as a fill char '***********centered***********'Look at the last example and the useful use comment