Pythonista20190305

图片发自App

继续print.

formater = "{0} {1} {2} {3}"

print(formater.format(1,2,3,4))
print(formater.format('one','two','three','four'))
print(formater.format(True,False,False,True))
print(formater.format(formater,formater,formater,formater))
print(formater.format('I had this thing.','That you could type up right.',"But it didn't sing.","so I said goodnight."))

字符串的格式化输出非常重要。
1994年的时候,为了辅助我组织的加涅理论学习小组学习,我用一款“动力空间”的asp网络程序,开发者网名webboy,美工好像叫雅虎,后来我和神机妙算20多少等在动力空间基础上共同开发了自由空间3.6,后来动力空间改名动易。我也离开了动力空间,去了博客园。接触了rainbow,dotnetnuke,这两款asp.net的网站程序。这些网站程序的模板,或者skin,本质上可以认为就是一个举行格式化输出。所以在格式化字符串打印上花费再多的功夫,我不觉无聊。

你可能感兴趣的:(Pythonista20190305)