i have a big dictionary...:)

Kamilche klachemin at home.com
Sat Jun 26 19:18:27 EDT 2004


gabor farkas <gabor at z10n.net> wrote in message news:<mailman.180.1088275787.27577.python-list at python.org>...

Have you considered keeping only the key in memory, plus an offset of
its location in the text file?

So it would look like:
  key   offset
  key1  14
  key2  275
  key3  64004

Then as you need to access individual lines, hop to the right spot in
the file based on the offset, and read the line.



More information about the Python-list mailing list