title: EOFError Ran out of input Python
body: <p>I am trying to use pickle to create a save file for my game, but When I try to submit my dictionary, and then take that information back, but it isn't working.</p>
  
  <pre><code>import pickle
  data = {'health':100, 'gold':1560, 'name': 'mariano'}
  with open('s.txt','wb') as f:
      pickle.dump(data, f, protocol = 2)
  
  with open('s.txt','rb') as f:
      data = pickle.load(f)
  </code></pre>
  
  <p>then when I run that code it gives me this error</p>
  
  <pre><code>EOFError: Ran out of input
  </code></pre>