python09 打印,除了打印,还是打印
2013-07-20 09:05
232 查看
来源:http://learnpythonthehardway.org/book/ex9.html
看下面代码ex9.py
你会看到下面结果
看下面代码ex9.py
# Here's some new strange stuff, remember type it exactly. days = "Mon Tue Wed Thu Fri Sat Sun" months = "Jan\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 ex9.py Here are the days: Mon Tue Wed Thu Fri Sat Sun Here are the months: Jan Feb Mar Apr May Jun Jul Aug 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.
相关文章推荐
- 第8个python程序:还是打印
- Learn Python The Hard Way学习(8) - 打印,还是打印
- python for x in range(0,10) 例如使用python打印9*9乘法表
- python算法-按要求打印 N*N 维 矩阵中的数值
- Python-入门-09-字符串常见函数(上篇)
- python_打印pstree效果
- 人工智能之Python09 函数
- python打印系统所有tcp,udp监听端口及服务
- python打印详细的异常信息
- python:logging模块(记录打印日志)
- python 2.7 命令行打印、print、str()、repr()
- Python3 Tkinter基础 Button Entry 点击按钮将输入框中文字打印到控制台中
- python-print 打印转义字符
- Python 学习(一) 32位还是64位
- 查看python是32位的还是64位的
- python 打印杨辉三角
- 3.python从尾到头打印链表
- 使用shell和python分别实现简单菜单功能--打印当前系统状态信息
- python 打印出所有的对象/模块的属性(实例代码)
- Python 在当前目录以及其子目录下查找文件名包含指定字符串的文件,并打印出相对路径。