9.打印,打印,打印——"""和\n
前言
编程中的大部分错误都是简单的拼写错误、录入错误或者没把别的一些简单东西弄对。
一、Atom文本编辑器
# Here's some new strange stuff, remember type it exactly.
days = "Mon Tue Wed Thu Fri Sat Sun"
months = "Jab\nFeb\nMar\nApr\nMay\nJun\nJul\nAug"
print("Here are the days:", days)
print("Here are the 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.
""" )
二、运行Python程序
在Window上键入Python就可以看到结果。
python ex9.py
总结
以上内容介绍了Python中的字符串和文本的用法,有关Python、数据科学、人工智能等文章后续会不定期发布,请大家多多关注,一键三连哟(●’◡’●)。