Help with inverted dictionary

rorley at gmail.com rorley at gmail.com
Tue Jul 12 10:46:30 EDT 2005


I'm new to Python and I'm struggling.  I have a text file (*.txt) with
a couple thousand entries, each on their own line (similar to a phone
book).  How do I make a script to create something like an inverted
dictionary that will allow me to call "robert" and create a new text
file of all of the lines that contain "robert"?


Thanks so much.




More information about the Python-list mailing list