想尝试一下Python中的最简单的输入:print函数的用法
lzzh@lzzh-VirtualBox:~/Desktop$ vim test.py
然后在test.py中输入以下命令:
password = raw_input("Please input the PASSWORD:")
print 'The password you have inputed is ',password
保存后运行出现这个问题:
如图:显示语法错误,在调用print函数时没有括号,于是改为用如下命令运行:
lzzh@lzzh-VirtualBox:~/Desktop$ python test.py
可行!
结果如下:
Please input the P