title: Check if there is an active window in Python
body: <p>I want to know whether or not there <em>is</em> an active window on a windows 10 machine. I've tried out other methods on stack overflow, but they all get confused between windows with no title and no active window. I would really appreciate a fool-proof way to detect this.</p>
  <p>Is there a way to do this at all?</p>