python sys execute shell command code example
Example 1: shell command python
import subprocess
subprocess.run(["ls", "-l"])
Example 2: python execute shell command
python3 yourcode.py
or
python yourcode.py
import subprocess
subprocess.run(["ls", "-l"])
python3 yourcode.py
or
python yourcode.py