- 帖子
- 5
- 精华
- 0
- 积分
- 27
- 阅读权限
- 10
- 注册时间
- 2016-2-20
- 最后登录
- 2016-3-5
|
1 formatter = "%r %r %r %r"
2 print formatter % (1, 2, 3, 4)
3 print formatter % ("one", "two", "three", "four") 4 print formatter % (True, False, False, True)
"I had this thing.",
"That you could type up right.", "But it didn't sing.", "So I said goodnight."
5 print formatter % (formatter, formatter, formatter, formatter) 6 print formatter % ( 7 8 9101112 )
你 应 该 看 到的 结 果
$ python ex8.py 1 2 3 4
'one' 'two' 'three' 'four' True False False True
'%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 s 来自: Android客户端 |
|