发布时间:2022-08-29 09:31:34 人气:192 作者:多测师
Python交互模式
在命令行模式下敲命令python,就看到类似如下的一堆文本输出,然后就进入到Python交互模式,它的提示符是>>>,
在Python交互模式下输入exit()并回车,就退出了Python交互模式,并回到命令行模式:
C:\Users\Administrator>python
Python 3.7.3 (v3.7.3:ef4ec6ed12, Mar 25 2019, 22:22:05) [MSC v.1916 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> 300 + 200
500
>>> exit()
C:\Users\Administrator>
了解了交互模式,那么在交互模式下输出文本,文字等内容,就简单了,如下
C:\Users\Administrator>python
Python 3.7.3 (v3.7.3:ef4ec6ed12, Mar 25 2019, 22:22:05) [MSC v.1916 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> print('我爱你')
我爱你
>>> print('多测师')
多测师
>>>
以上内容为大家介绍了python培训之交互模式怎么输出汉字,希望对大家有所帮助,如果想要了解更多Python相关知识,请关注多测师。https://www.e70w.com/xwzx/