Python入门.格式化字符串

print '{0} is {1}:{2}'.format('123',1,3)



str='dick'
score=80
print '%s score is %d'%(str,score)

猜你喜欢

转载自8850702.iteye.com/blog/2277058