writing from file into dictionary
Bo
esobolew at hotmail.com
Mon Nov 11 05:11:29 EST 2002
Hi all!
I've just started to "play" with Python. Can someone tell me how to
read the grammar in from the file , and place it into a dictionary ?
The grammar is represented by lines where the head is separated from
the rewrite by a colon, as in the following :
start:person does something:
start:I do something:
activity:dancing:
activity:eating: #and more
This should be placed into a dictionary...
Thanks a lot, greetings
Bo
More information about the Python-list
mailing list