如何将一段代码作为参数传递给python?
我这样试过,但是没用。
$ python3 'print("hello world")'
无法打开文件 'print(hello': [Errno 2] No such file or directory
最佳答案
python -c 'print("hello world")'
关于Python 代码作为参数,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6006322/