i have a big dictionary...:)

Kamilche klachemin at home.com
Sun Jun 27 01:18:27 CEST 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