run python with shell script code example
Example 1: how to execute bash commands in python script
import subprocess
subprocess.call(["sudo", "apt", "update"])
Example 2: call shell script from python
import subprocess
subprocess.call(["./shell.sh"])
# Make sure that "shell.sh" has "+x" permissions