我如何拥有a)可以接受用户输入的Python脚本以及如何创建它b)如果从命令行运行,则读入参数?
var = raw_input("Please enter something: ") print "you entered", var
Or for Python 3:
(或者对于Python 3:)
var = input("Please enter something: ") print("You entered: " + var)
1.4m articles
1.4m replys
5 comments
57.0k users