Post

Executing Python in Shell

Executing Python in Shell

To execute Python in Shell simply use python3 -c. For example, the following checks the location of your Python executable.

1
python3 -c 'import sys; print(sys.executable);'
This post is licensed under CC BY 4.0 by the author.