Importing a dicrionary from a file

Sposhua sposhua at my.pc
Wed Jan 5 04:56:35 EST 2000


On Tue, 4 Jan 2000, Black Mantis wrote:

> hello
> I am a newbie, and i am working on a program that uses a really big
> dictionary. i was wondering if i could store the dictionary in a
> seperate file, let's say dict.dat. Now, at the beggining of the program
> i want to import that dictionary and get it ready, how would i do this?
> is there a way to read the whole input file into one variable?

Use the shelve module.




More information about the Python-list mailing list