Angus Rodgers wrote:
[..]

This feels like a bit of a cheat, as if I am trying to program in
Python as if it were some other more familiar language.  Should I
have coded this differently?

I can't offer anything concrete but here are some things that occur to me at a glance.

0. You can try to use the collections module in 2.6 (especially the namedtuple object which gives you access to things through attributes as well as through order. 1. You have 3 lists (denom, plural and count) which you will iterate through in lockstep as far as I can tell. It's an option to use a list of 3-tuples or a list of dictionaries with three keys (denomination, plural and count).

Thanks.

--
~noufal
http://nibrahim.net.in/
_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to