Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #47546

Re: Reply to post 'Tryign to add a valkue to a set'

Date 2013-06-10 13:57 +0300
From Νικόλαος Κούρας <nikos.gr33k@gmail.com>
Subject Re: Reply to post 'Tryign to add a valkue to a set'
References <201306100650.873248273868@forums.devshed.com>
Newsgroups comp.lang.python
Message-ID <mailman.2963.1370861835.3114.python-list@python.org> (permalink)

Show all headers | View raw


 >Τη Δευτέρα, 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? )

Back to comp.lang.python | Previous | NextNext in thread | Find similar | Unroll thread


Thread

Re: Reply to post 'Tryign to add a valkue to a set' Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2013-06-10 13:57 +0300
  Re: Reply to post 'Tryign to add a valkue to a set' Ulrich Eckhardt <ulrich.eckhardt@dominolaser.com> - 2013-06-10 15:14 +0200
    Re: Reply to post 'Tryign to add a valkue to a set' Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2013-06-10 06:37 -0700
      Re: Reply to post 'Tryign to add a valkue to a set' Ulrich Eckhardt <ulrich.eckhardt@dominolaser.com> - 2013-06-10 16:58 +0200
    Re: Reply to post 'Tryign to add a valkue to a set' Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2013-06-10 07:03 -0700
      Re: Reply to post 'Tryign to add a valkue to a set' Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2013-06-10 07:37 -0700
  Re: Reply to post 'Tryign to add a valkue to a set' russ.pobox@gmail.com - 2013-06-10 08:34 -0700
    Re: Reply to post 'Tryign to add a valkue to a set' Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2013-06-10 08:55 -0700
  Re: Reply to post 'Tryign to add a valkue to a set' russ.pobox@gmail.com - 2013-06-11 00:21 -0700

csiph-web