2.13 带逗号的print语句输出的元素之间自动带个空格

 

what+'空格'*4,结果是后面四个空格

>>> who='k'
>>> what='Ni!'
>>> print('we are hte %s who say %s'%(who,((what+' ')*4)))
we are hte k who say Ni! Ni! Ni! Ni! 
>>> print('we are hte %s who say %s'%(who,(what+' '*4)))
we are hte k who say Ni!    

 

posted @ 2015-07-07 17:31  hhj187  阅读(347)  评论(0编辑  收藏  举报