Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我进入 File-properties-edit-arguments 输入一个字符串。运行程序时我没有输出。
def print(n): print n
确保您从某个地方调用该方法,通常是 Python 文件中的一个main()或test()函数。另外,避免使用print,因为它掩盖了实际的语句/函数。(在 Python 2.x 中,这甚至不会运行- 您必须将其命名为print.)
main()
test()
print
def main(): print(raw_input("Will print something ")) if __name__ == '__main__': main()