python字符串的常用方法

 

 

 

repr 、ljust  和 rjust   :

>>> repr(2*2).rjust(3)

'  4'

>>> repr(2*2).ljust(3)

'4  '

posted @ 2018-06-06 11:50  裴敏儿  阅读(144)  评论(0)    收藏  举报