title: How to get the value fastly from a file on python?
body: <p>I want to store a dict and read it with other script fastly.</p>
  
  <p>the data stored in a dict like {1:a,2:b,3:c,...}.I stored the dict on disk  using code：</p>
  
  <pre><code>with open(filename+,'w') as f:
       f.write(str(dict1))
  </code></pre>
  
  <p>then I want to get the value with the key like [3,7,9...] in the other python script.</p>
  
  <p>Does it must read the whole file？it wastes a lot of time. </p>
  
  <p>I find <code>mmap</code>,but I don't know how to use it.</p>