码迷,mamicode.com
首页 > 编程语言 > 详细

python3的输入输出

时间:2018-05-10 17:23:47      阅读:186      评论:0      收藏:0      [点我收藏+]

标签:引号   img   lov   \n   ring   str   逗号   class   NPU   

输出函数用法

print(‘hello,world‘)   #单引号和双引号都可以输出
print("hello,world")
print(‘I‘,‘Love‘,‘You‘) #中间的逗号会变成空格
print(‘\r\n‘)           #会有一个换行
print(‘我爱中国‘)
print(‘100+200=‘,100+200) #会自动计算出结果

 

运行结果:

技术分享图片

 

输入函数

name = input(‘please enter your name: ‘)
print(‘hello,‘, name)

 

python3的输入输出

标签:引号   img   lov   \n   ring   str   逗号   class   NPU   

原文地址:https://www.cnblogs.com/chulin/p/9019906.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!