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!
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!
转载于:https://www.cnblogs.com/hhj187/p/4627680.html