We can run Python Code in shell using python -c option.
python -c
$ python3 -c "print('Hello World')" Hello World
Source: Python Docsarrow-up-right
Last updated 1 year ago