title: Python open() flags for open or create
body: <p>What is the mode for <a href="https://docs.python.org/3/library/functions.html?highlight=open#open" rel="noreferrer">open(..., mode)</a> in Python 3 that opens a file that</p>
  
  <ul>
  <li>create if does not exist</li>
  <li>do NOT truncate</li>
  <li>binary mode</li>
  </ul>
  
  <p>I tested <code>r+b</code> but that fails on missing file, <code>w+b</code> truncates it, and <code>a+b</code> seem to turn all writes into appends, while I need to overwrite some data.</p>