since you did not accept the duplicate as an answer, I can suggest:
import win32com.client
shell = win32com.client.Dispatch("WScript.Shell")
shell.SendKeys('keys to send to active window...')
from
here
and if you need to know about keys like Backspace, go to
here
source
share