how to open python shell in cmd code example
Example 1: python run shell command
import subprocess
process = subprocess.Popen(['echo', 'More output'],
stdout=subprocess.PIPE,
stderr=subprocess.PIPE)
stdout, stderr = process.communicate()
stdout, stderr
Example 2: python execute shell command
python3 yourcode.py
or
python yourcode.py