码迷,mamicode.com
首页 > 编程语言 > 详细

笨方法学python--打印

时间:2016-10-12 17:13:27      阅读:171      评论:0      收藏:0      [点我收藏+]

标签:

1 print 语句 尾端的逗号

end1 = "C"
end2 = "h"
end3 = "e"
end4 = "e"
end5 = "s"
end6 = "e"
end7 = "B"
end8 = "u"
end9 = "r"
end10 = "g"
end11 = "e"
end12 = "r"

# watch that comma at the end.  try removing it to see what happens
print end1 + end2 + end3 + end4 + end5 + end6,
print end7 + end8 + end9 + end10 + end11 + end12

结果:
Cheese Burger

若没有逗号
Cheese
Burger

2 3个双引号的使用
引号之间不能有空格
 

笨方法学python--打印

标签:

原文地址:http://www.cnblogs.com/guohuino2/p/5953266.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!