您的位置:首页 > 其它

练习9:更多打印 = =、

2016-03-31 14:20 197 查看
只是单纯的打印练习= =、直接上代码了,注意事项都注释在代码里

# Here's some new strange stuff, remember type it exactly.
days = "Mon Tue Wed Thu Fri Sat Sun"
months = "Jan\nFeb\nMar\nMay\nJu1\nAug"
print "Here are the days: ", days
print "Here are the months: ", months
print """
There's something goning on here.
With the three double-quotes.
We'll be able to type as much as we like.
Even 4 lines if we want, or 5, or 6.
""" # 使用3对双引号以输出多行字符串
print "%r" % months # %r用于打印出代码的原本样子


运行结果

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: