Path: csiph.com!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed1.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.040 X-Spam-Evidence: '*H*': 0.92; '*S*': 0.00; 'win32': 0.03; 'python': 0.11; 'dict': 0.16; 'iterable': 0.16; 'typeerror:': 0.16; 'all,': 0.19; 'bit': 0.19; '>>>': 0.22; 'print': 0.22; 'message- id:@mail.gmail.com': 0.30; 'skip:( 20': 0.30; '"",': 0.31; 'file': 0.32; '(most': 0.33; 'subject:with': 0.35; 'received:google.com': 0.35; 'doing': 0.36; 'hi,': 0.36; 'thank': 0.38; 'to:addr:python- list': 0.38; 'recent': 0.39; 'to:addr:python.org': 0.39; 'you.': 0.62; 'more': 0.64; '2013,': 0.91 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=RZ6eoOvvmCTAiUAemiZldMoOMNn9mV3ngvcIhCGR0es=; b=riZTSqn5n8XxiJl51BOeG4JN55sh8Ub1qdXFV+fezr4y/TZy2YLUKNEnLkX8F9bscd uvEiZay422kGV6pIULTG51+HHT1XbbsF5OxmCQRY+4EETlGkhKJLa50dTmR3dxD98H+v zQmm11TbKe5uV4abPE4HUbLMFmi0gwSBNWiLHgRGF3jvnj8u5yhcGcoobEO8IDNCpsBa ZL5EzCinr3Jhl32qPrMEmLGJ/19TI5EwU8iU7SMi7JW04oLGqSQey01iWYb6N2dXk0tV P416dHCNutjym9g5/7A6XNFvwTn/ovVnp6zTt71w8wRIs3xSqQDyx8BEa1CprOJL0G0P 5GaQ== MIME-Version: 1.0 X-Received: by 10.60.35.73 with SMTP id f9mr2957877oej.50.1389733808108; Tue, 14 Jan 2014 13:10:08 -0800 (PST) Date: Tue, 14 Jan 2014 13:10:07 -0800 Subject: dictionary with tuples From: Igor Korot To: python-list@python.org Content-Type: text/plain; charset=ISO-8859-1 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: 20 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1389733811 news.xs4all.nl 2840 [2001:888:2000:d::a6]:60424 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:63938 Hi, ALL, C:\Documents and Settings\Igor.FORDANWORK\Desktop\winpdb>python Python 2.7.5 (default, May 15 2013, 22:43:36) [MSC v.1500 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> dict = {} >>> dict[(1,2)] = ('a','b') >>> dict[(3,4)] = ('c','d') >>> for (key1,key2),(value1,value2) in dict: ... print key1, " ", key2 ... print value1, " ", value2 ... Traceback (most recent call last): File "", line 1, in TypeError: 'int' object is not iterable >>> What am I doing wrong? Thank you.