Help with inverted dictionary
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.python archive

Help with inverted dictionary

From: <rorley@gmail.com>
Date: Tue Jul 12 2005 - 16:46:30 CEST

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.
Received on Thu Sep 29 16:54:09 2005