title: Saving integers within pickle and calling them
body: <p>So this is my code, I would like to save the value 'test' to the file so that it can be called to be used when the program is reopened. </p>
  
  <pre><code>import pickle
  test = 0
  
  def Save():
       with open('objs.pickle', 'wb') as f:
           pickle.dump(test, f)
  
  def Load():
      with open('objs.pickle', 'rb') as f:
          test = pickle.load(f)
  </code></pre>
  
  <p><em>The problem with this code is that when I reopen the program and run in and then type in Load(), it says that 'test' is still equal to 0. (Missing somehting obvious probably)</em></p>
  
  <p>And so my question is, how could I fix the problem issued in italics?</p>