开发者

Python code as arguments

How to pass a piece of code as arguments to python?

I tried like this, but it didn't work.

$ python3 'print("hello world")'

can't open file 'p开发者_如何学Pythonrint(hello': [Errno 2] No such file or directory


python -c 'print("hello world")'


Try

python3 -c 'print("hello world")'
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜