For the complete documentation index, see llms.txt. This page is also available as Markdown.

Execute Python Code In Command Shell

We can run Python Code in shell using python -c option.

Example

python3 -c "print('Hello World')"
Hello World

Source: Python Docs

Last updated