1 # coding:utf-8 2 3 4 5 #########python2中rawinput和input的区别########## 6 # raw_input 7 # username = raw_input('请输入用户名') 8 # print (username) 9 10 #input函数:会把用户输入的字符串当成一个代码来执行 11 # username = input('请输入用户名:') 12 # print (username) 13 14 # username= zhiliao 15 # print usarname 16 17 18 #############python3中############ 19 #在python3中只有一个输入函数,那就是input 20 # 只不过这个input函数等价于python2中的raw_input函数 21 22 username = input('请输入用户名: ') 23 print (username)
# coding:utf-8
#########python2中rawinput和input的区别##########
# raw_input
# username = raw_input('请输入用户名')
# print (username)
#input函数:会把用户输入的字符串当成一个代码来执行
# username = input('请输入用户名:')
# print (username)
# username= zhiliao
# print usarname
#############python3中############
#在python3中只有一个输入函数,那就是input
# 只不过这个input函数等价于python2中的raw_input函数
username = input('请输入用户名: ')
print (username)