[Tutor] python questions about dictionary loops

justin fargus fargusjustin at gmail.com
Tue Feb 28 23:48:14 CET 2012


Hello,


I'm new to Python. Just started a few weeks ago and I've been learning some
basic things that I would like to put together but I don't even know where
to began. I am trying to do the following:

Make a program using two sentences of about 8 words (total between the two
sentences).  I would then like to create a dictionary {} and split the
words of each sentence using one sentence as a dictionary key and using the
other sentence for the dictionary value.  I would then like to use a loop
(while or for) that will write out a file that has the dictionary key and
dictionary value to it.  How can I go about doing this? I've noticed with
Python there is more than one way to do most things. I would like the
simplest so that I can practice over and over again on my own until I
understand it. Thanks in advance

Regards,

Justin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20120228/dcfa36e7/attachment.html>


More information about the Tutor mailing list