Format: add trailing spaces to character output to left-justify

前端 未结 5 2089
渐次进展
渐次进展 2021-01-06 11:34

How do you format a string to have constant width and be left-justified? There is the Aw formatter, where w denotes desired width of chara

5条回答
  •  悲哀的现实
    2021-01-06 11:53

    I suggest that you do not limit the number of output characters.

    Change it to the following will work:

    44 format(A)
     print 44, 'Hi Stack Overflow'
    

提交回复
热议问题