1 Star 0 Fork 0

lhjlzf / Learn Python The Hard Way Note

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
ex7.py 699 Bytes
一键复制 编辑 原始数据 按行查看 历史
# _*_ coding: utf-8 _*_
print ("Mary had a little lamb.")
print ("Its fleece was white as %s." % 'snow')
print ("And everywhere that Mary went.")
print ("." * 10) # what'd that do?
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
# 在 python2 中,print 函数后面加上逗号“,”,可以将两个 print 函数打印到一行
# 在 python3 中,可以利用end参数,将 print() 函数默认的换行符改为空格即可
print (end1 + end2 + end3 + end4 + end5 + end6, end = " ")
print (end7 + end8 + end9 + end10 + end11 + end12)
Python
1
https://gitee.com/lhjzf/Learn-Python-The-Hard-Way-Note.git
git@gitee.com:lhjzf/Learn-Python-The-Hard-Way-Note.git
lhjzf
Learn-Python-The-Hard-Way-Note
Learn Python The Hard Way Note
master

搜索帮助