code: def executable_exists(executable):
      
      for directory in os.getenv("PATH").split(":"):
          if os.path.exists(os.path.join(directory, executable)):
              return True
      return False
docs: Test if an executable is available on the system.