2.1.1. 参数传递调用解释器时,脚本名和附加参数传入一个名为 2.1.2. 交互模式从 tty 读取命令时,我们称解释器工作于 交互模式。这种模式下它根据主提示符来执行,主提示符通常标识为三个大于号( $ python3.5
Python 3.5.2 (default, Mar 16 2014, 09:25:04)
[GCC 4.8.2] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>
输入多行结构时需要从属提示符了,例如,下面这个 if 语句: >>> the_world_is_flat = 1
>>> if the_world_is_flat:
... print("Be careful not to fall off!")
...
Be careful not to fall off!
关于交互模式更多的内容,请参见 交互模式。 |
Archiver|手机版|笨鸟自学网 ( 粤ICP备20019910号 )
GMT+8, 2025-5-3 05:56 , Processed in 0.024797 second(s), 17 queries .