title: Bad characters serializing an object in python 3.4
body: <p>I'm a beginner in python. I don't know why I obtain bad characters writing a dictionary in a .txt file with <code>pickle.dump</code>.</p>
  
  <p>I do in this way:</p>
  
  <pre><code>a={test:test1,"hello":"world", 541:123}
  f=open("test.txt","wb")
  import pickle
  pickle.dump(str(a),f)
  </code></pre>
  
  <p>In the file I find:</p>
  
  <pre><code>€X-   {'hello': 'world', 'test': 'test1', 541: 123}q .
  </code></pre>
  
  <p>Why there's <code>€X-</code> and <code>q</code> in the output?</p>