Re: Error when trying to sort and presnt a dictionary in python 3.3.1

2013-05-26 Thread Νίκος Γκρ33κ
Τη Κυριακή, 26 Μαΐου 2013 3:58:12 μ.μ. UTC+3, ο χρήστης Νίκος Γκρ33κ έγραψε: > Τη Κυριακή, 26 Μαΐου 2013 3:20:19 μ.μ. UTC+3, ο χρήστης Peter Otten έγραψε: > > > > > At some point you have to admit that coding isn't your cup of tea. > > > Or Ouzo ;( > > > > And i didn't evne drank anyhting, i

Re: Error when trying to sort and presnt a dictionary in python 3.3.1

2013-05-26 Thread Νίκος Γκρ33κ
Τη Κυριακή, 26 Μαΐου 2013 3:20:19 μ.μ. UTC+3, ο χρήστης Peter Otten έγραψε: > At some point you have to admit that coding isn't your cup of tea. > Or Ouzo ;( And i didn't evne drank anyhting, iam sober! Imagine what i would have written if i had some shots of Ouzo :-) I chnage my code to: mont

Re: Error when trying to sort and presnt a dictionary in python 3.3.1

2013-05-26 Thread Peter Otten
Νίκος Γκρ33κ wrote: > python3 pelatologio.py gives me error in this line: > > Traceback (most recent call last): > File "pelatologio.py", line 283, in > ''' % (months[key], key) ) > KeyError: 1 > > The code is: > > #populating months into a dropdown menu > years = ( 2010, 2011,

Error when trying to sort and presnt a dictionary in python 3.3.1

2013-05-26 Thread Νίκος Γκρ33κ
python3 pelatologio.py gives me error in this line: Traceback (most recent call last): File "pelatologio.py", line 283, in ''' % (months[key], key) ) KeyError: 1 The code is: #populating months into a dropdown menu years = ( 2010, 2011, 2012, 2013 ) months = { 'Ιανουάριος':1, 'Φε