首页 > 其他 > 详细

Exercise 8 - printing, printing

时间:2019-09-26 19:49:38      阅读:97      评论:0      收藏:0      [点我收藏+]

 

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

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

output

1 2 3 4
one two three four
True False True False
%r %r %r %r %r %r %r %r %r %r %r %r %r %r %r %r
I had this thing. That you could type up right. "But it didn‘t sing." So I said goodnight.

 

2019-09-26

21:27:37

Exercise 8 - printing, printing

原文:https://www.cnblogs.com/petitherisson/p/11593212.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!