[Tutor] Some ways lists and dictionaries can be used unconventionally?

Tidal Espeon tidal.espeon at gmail.com
Sun May 22 22:29:07 CEST 2011


I've been trying to make a text-based character creator program, and it was
going pretty well. I was debugging it earlier, and I was well on my way. The
problem is, that its something I have to do at the end of a python book's
chapter about learning lists and dictionaries, and I didn't use either in my
code.

I've been trying to think of how lists and dictionaries can be useful (or
even significantly relevant. storing a bunch of variables just shortens the
code by a few lines), but I fail to see any significant connection.
(honestly, i don't get a key-value pair make this sort of program easier to
make.) :/

Since the book told me to do it, I know there must be something. I'd like to
be taught some uses of dictionaries besides using it as a semi-literal
dictionary, and uses of lists besides being conveniently changeable tuples.
I think I can figure it out myself afterwards.

Please and thank you! :)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20110522/77d01906/attachment.html>


More information about the Tutor mailing list