美文网首页
Pythonista20190306

Pythonista20190306

作者: 7300T | 来源:发表于2019-03-06 03:26 被阅读6次
图片自7300T

记得第一次学习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.
""")

相关文章

  • Pythonista20190306

    记得第一次学习python时,用的是记事本写代码,在powershell运行,错误百出,现在用pythonista...

网友评论

      本文标题:Pythonista20190306

      本文链接:https://www.haomeiwen.com/subject/nmrzuqtx.html