I would like to ask you, how do I check the 1st line of the terminal output for example: if i do "pip show keyboard" how do i check that it said "WARNING: Package(s) not found: keyboard" in the command prompt?
I have no idea how to do it, the code below is just an example of what I want to do
import os
from time import sleep
keyboard_check = os.system("pip show keyboard")
if keyboard_check[0] == "WARNING: Package(s) not found: keyboard":
print("keyboard is not installed")
sleep(1)