The title pretty much says it, although it does not need to be specific to a cmd, just closing an application in general. I have seen
os.system(taskkill bla
For anyone who's stuck with Python 2.7 and unable to download pywin32 thanks to red tape in your organization. If you're on Windows XP and above you can use taskkill to kill the process by window title name like below for a dos command prompt that was started in elevated mode with title MyTitle
os.system('taskkill /fi "WindowTitle eq Administrator: MyTitle"')