阅读背景:

笨方法学Python 习题 8: 打印,打印

来源:互联网 
#!usr/bin/python
# -*- coding:utf8 -*-

formatter = "%r %r %r %r"

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


print ("__________________________")

formatter = "%s %s %s %s"

print (formatter % (1 , 2 , 3 , 4))
print (formatter % ("one" , "two" , "three" , "four"))
print (formatter % (True , False , False , True))
print (formatter % (formatter , formatter , formatter , formatter))
print (formatter % (
    "I had this thing.",
    "That you could type up rihgt.",
    "But it didn't sing.",
    "So I said goodnight."
	))#!usr/bin/python
# -*- coding:utf8 -*-

formatt



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: