python怎么输出变量加文字书名_python的交互模式怎么输出名文汉字

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('祖国万岁')

祖国万岁

>>>


版权声明:本文为weixin_39631951原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。