Last updated 8 months ago
We can run Python Code in shell using python -c option.
python -c
$ python3 -c "print('Hello World')" Hello World
Source: