title: binary file not writing data in "ab" mode in python
body: <p>I have user.dat binary file in ./data folder(in my project directory) I am trying to append data in this file in &quot;ab&quot; mode but nothing is happening but when I use &quot;wb&quot; mode data writes to it without any problem</p>
  <pre><code>import os,pickle
  absolutePath = os.path.dirname(__file__)
  def ap():
      data = [&quot;B&quot;,&quot;2&quot;]
      with open(absolutePath+&quot;\\data\\user.dat&quot;,&quot;ab&quot;) as f:
          pickle.dump([data],f)
  </code></pre>
  <p><strong>Note</strong>: In appending mode dump function returns <code>None</code> on execution</p>