>Τη Δευτέρα, 10 Ιουνίου 2013 12:40:01 μ.μ. UTC+3, ο χρήστης Ulrich Eckhardt έγραψε:

for key in sorted( months.keys() ):
        print('''
                <option value="%s"> %s </option>
        ''' % (months[key], key) )

this in fact works, it sorts the dict by its keys() was mistaken before but the sorting aint correct because its done alphabetically and not by integer value.
We need values.


for key in sorted( months.values() ):
        print('''
                <option value="%s"> %s </option>
''' % (key, what should_we put here_to get the actual months name? )
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to