[Tutor] Poor style to use list as "array"?
alan.gauld at btinternet.com
Mon Jul 6 01:16:26 CEST 2009
"Angus Rodgers" <angusr at bigfoot.com> wrote
> as keys? Is it possible to guarantee a sequence in which the keys
> of a dictionary are iterated through?
for key in sorted( dct ):
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!)
Author of the Learn to Program web site
More information about the Tutor