Path: csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!news.stack.nl!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!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.154 X-Spam-Level: * X-Spam-Evidence: '*H*': 0.69; '*S*': 0.00; 'all,': 0.19; 'trying': 0.19; 'error': 0.23; 'this:': 0.26; 'values': 0.27; 'message- id:@mail.gmail.com': 0.30; "i'm": 0.30; 'getting': 0.31; 'stuff': 0.32; 'subject:the': 0.34; 'subject:with': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'doing': 0.36; 'hi,': 0.36; 'thank': 0.38; 'to:addr:python-list': 0.38; 'to:addr:python.org': 0.39; 'you.': 0.62; '"too': 0.84 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=XYhasPGXvETiP3RrEWXpfBy9VkekRpmoRd9hFC9qDas=; b=uo1tgpfQVhG/dOUvPqPuh73dgbDhZYaPLY0wwhaQlPrTitGNLrxyMyuxpfNPbY6AIl P2UChajY0Oquj1QXdDXy0AfahnuZ10f+IfqFOnhCS0w3zsY9xSLkDViNmtOamc7zLKxV QUT3vtZds3kmDXNNUXzmswHbPvMXgITkz7eiP2KsujsdBcift0aLfvTFNsEiBRHchb9E OlUB0JKEknerhUISZwGPbzpgw2AN3il99ORC0KuTS9osCdcbgzwaW+mqWAOc2L1bs0f+ LlRANteoAqw4zP8KyLZ4BovfqQV40I18yBapaa04Tc4j36Yv30tI05KVGtNNv6nMsAB+ M8nA== MIME-Version: 1.0 X-Received: by 10.221.44.73 with SMTP id uf9mr15282057vcb.9.1401022500850; Sun, 25 May 2014 05:55:00 -0700 (PDT) Date: Sun, 25 May 2014 05:55:00 -0700 Subject: Loop thru the dictionary with tuples From: Igor Korot To: python-list@python.org Content-Type: text/plain; charset=UTF-8 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: 16 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1401022510 news.xs4all.nl 2836 [2001:888:2000:d::a6]:39176 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:72001 Hi, ALL, I have a following data structure: my_dict[(var1,var2,var3)] = None my_dict[(var4,var5,var6)] = 'abc' What I'm trying to do is this: for (key,value) in my_dict: #Do some stuff but I'm getting an error "Too many values to unpack". What am I doing wrong? Thank you.