Issue
Suppose, I'm building an application where shell commands gonna execute. How to check that the command I'm using is available or not?
Solution
You can use subprocess module to execute shell commands
import subprocess
output = subprocess.check_output(command, shell=True).decode("ascii")
How do I check if a package is installed
Answered By - can