"Angus Rodgers" <ang...@bigfoot.com> wrote
as keys?  Is it possible to guarantee a sequence in which the keys
of a dictionary are iterated through?

Indirectly yes:

for key in sorted( dct ):
   print key

I would definitely tend to go with a dictionary for the denominations/values in this case (Actually I'd probably go for a class but that's another ball game entirely!)


--
Alan Gauld
Author of the Learn to Program web site
http://www.alan-g.me.uk/

_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to