Since dict.keys() return a list of the keys in the dict and the keys are associated with the dict's values why doesnt it work the other way around too?
I'm talking about this: [code] for key in sorted( months.keys() ): print(''' <option value="%s"> %s </option> ''' % (months[key], key) ) [/code] I could have uses ordered by kees but that orders key alphabetically, and montha re not displayed in the usual row. ordering by values though it would be a perfect fit. -- http://mail.python.org/mailman/listinfo/python-list