练习9:更多打印 = =、

来源:互联网 发布:哈佛法学院 知乎 编辑:程序博客网 时间:2024/05/17 08:05

只是单纯的打印练习= =、直接上代码了,注意事项都注释在代码里

# 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: ", daysprint "Here are the months: ", monthsprint """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用于打印出代码的原本样子

运行结果
这里写图片描述

0 0
原创粉丝点击