记得第一次学习python时,用的是记事本写代码,在powershell运行,错误百出,现在用pythonista输入极少报错,归功于我已有一些写代码的经验,也有pythonista的功劳,能提醒你的时候它不厌其烦的提醒你。
这段代码中训练了三引号,字符串中加\n灰输出换行。
顺便把敲的代码附在后面:
#Here's some strange stuff,remember type it exactly.
days = "Mon Tue Wed Thu Fri Sat Sun"
months = "\nJan\nFeb\nMay\nJun\nJul\nAug"
print("Here are he days:",days)
print("Here are Months:",months)
print("""
There's something going 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.
""")
网友评论