講師回答 / 廖雪峰
%s是轉(zhuǎn)換成str,print '%s' % 100 也是可以的%d是轉(zhuǎn)換成整數(shù), print '%d' % 100 沒問題但是 print '%d' % 'abc' 會報錯通常用%s都是可以通吃的
2014-09-19