Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.051 X-Spam-Evidence: '*H*': 0.91; '*S*': 0.01; 'name?': 0.09; 'subject:set': 0.09; "'''": 0.16; '(key,': 0.16; 'dict': 0.16; 'eckhardt': 0.16; 'key)': 0.16; 'sorting': 0.16; 'sorts': 0.16; 'subject:post': 0.16; 'value.': 0.19; 'header:User-Agent:1': 0.23; 'integer': 0.24; 'header:In-Reply-To:1': 0.27; 'correct': 0.29; 'values.': 0.31; 'actual': 0.34; 'but': 0.35; 'received:google.com': 0.35; 'done': 0.36; 'message- id:@gmail.com': 0.38; 'to:addr:python-list': 0.38; 'fact': 0.38; 'to:addr:python.org': 0.39; 'from:charset:utf-8': 0.61; '8bit%:92': 0.71; '8bit%:100': 0.72; 'mistaken': 0.84; 'subject:add': 0.91; '2013': 0.98 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=wxfL39OCQSnBhhrifp8rmg+92zWDXcGuVjGGXA5hO2w=; b=YofnvIn2Nsv2gEj0uAtG8XkrmlMo5C2ISCRE+3liPkDf7fyYVIHq93j6r6dtVMekbJ n/j/O4jGltyJATZvaiTS2tQPpKRhwcev8d6i3lFh6SIiARD6/yb8jZ8/Ho8mlWH3x0rs oQVxr1Vg/jgIFI6JUNKhXweT7EMz3flwC7LKb2pAp4dTc6YG3IU3ZKU5D5U+Fhlk0I+/ fOkvmKtXX/GpmzQqN2iXetp9fOx7uUVKdmqCnvcmw3/CrL1dLZnUHViTn2BoV/t2Xcqn 3L4NNVtoacFASAdG3PGg98MyzzSAC5MrAisr4MkA48oWbEcjirXfZS4zVeKHn7iTU7Vv UhYA== X-Received: by 10.205.40.68 with SMTP id tp4mr1424281bkb.175.1370861832835; Mon, 10 Jun 2013 03:57:12 -0700 (PDT) Date: Mon, 10 Jun 2013 13:57:09 +0300 From: =?UTF-8?B?zp3Ouc66z4zOu86xzr/PgiDOms6/z43Pgc6xz4I=?= User-Agent: Mozilla/5.0 (Windows NT 6.2; WOW64; rv:22.0) Gecko/20100101 Thunderbird/22.0 MIME-Version: 1.0 To: python-list@python.org Subject: Re: Reply to post 'Tryign to add a valkue to a set' References: <201306100650.873248273868@forums.devshed.com> In-Reply-To: <201306100650.873248273868@forums.devshed.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 19 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1370861835 news.xs4all.nl 15864 [2001:888:2000:d::a6]:52573 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:47546 >Τη Δευτέρα, 10 Ιουνίου 2013 12:40:01 μ.μ. UTC+3, ο χρήστης Ulrich Eckhardt έγραψε: for key in sorted( months.keys() ): print(''' ''' % (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(''' ''' % (key, what should_we put here_to get the actual months name? )