Programming for Everybody (Python)
1. 视频 2.2
从键盘获取输入,视频中讲的是
nam = input('who are you?')
print('hello', nam)
在python2.7中提示 "nam not defined" 错误。
一种解决方式是输入 " *** ";
另一种是采用如下的命令:
nam = raw_input('who are you?')
print 'hello', nam
Programming for Everybody (Python)
从键盘获取输入,视频中讲的是
nam = input('who are you?')
print('hello', nam)
在python2.7中提示 "nam not defined" 错误。
一种解决方式是输入 " *** ";
另一种是采用如下的命令:
nam = raw_input('who are you?')
print 'hello', nam
本文标题:Python 学习笔记
本文链接:https://www.haomeiwen.com/subject/whsxlxtx.html
网友评论