Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.freenet.ag!news2.euro.net!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.051 X-Spam-Evidence: '*H*': 0.90; '*S*': 0.00; 'iterate': 0.09; 'suggest': 0.14; 'dict': 0.16; 'iterated': 0.16; 'iterkeys': 0.16; 'prog': 0.16; 'subject: ?': 0.16; 'to:name:python-list@python.org': 0.22; 'function': 0.29; 'returned': 0.30; 'message-id:@mail.gmail.com': 0.30; 'but': 0.35; 'received:google.com': 0.35; 'shows': 0.36; 'possible': 0.36; 'error.': 0.37; 'to:addr:python-list': 0.38; 'to:addr:python.org': 0.39; 'subject:Can': 0.60; 'address': 0.63; 'subject:over': 0.84 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:date:message-id:subject:from:to :content-type; bh=iJ1LSpvsH/kbxb/vtj8frUckhVwk2m3Pxfs5qA2sZ+A=; b=yNrcB/Dc0vINJV4L7RkfsMAoIhdG2wjRii0NXxvQDH4qBj0aTKF4UdNbgo2vQHv/wj GPUwf1EZ9pxXbviy4iySe1AF7qRpMDhfFt0Hqv1eo6rWtXKqTVnZL0gaUO17epZy8vri ZDHK+cMjh0UXSo8/F7i81vnWlv9fuDpjEB/B5bBmip0GQ2Q0KrQBp08Idr0zFsAkPAb4 BaWv6SdsBHk/sDg6+H2nhcEsJXZKes0okAk3cQ/oSQxqntsMdWygPbwSeYznRcdqmE65 mg1J8dDb3bYindZmnIzsrpRjnSw+Ya+TEmT2eC0m4cncKBD7pStYA42Ch32IEfdVSE0t P3Ig== MIME-Version: 1.0 X-Received: by 10.50.212.38 with SMTP id nh6mr15225009igc.72.1365673686877; Thu, 11 Apr 2013 02:48:06 -0700 (PDT) Date: Thu, 11 Apr 2013 15:18:06 +0530 Subject: Can I iterate over a dictionary outside a function ? From: inshu chauhan To: "python-list@python.org" Content-Type: multipart/alternative; boundary=14dae93408fffc4bff04da12ae3d 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: 23 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1365673689 news.xs4all.nl 2640 [2001:888:2000:d::a6]:50921 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:43342 --14dae93408fffc4bff04da12ae3d Content-Type: text/plain; charset=ISO-8859-1 I have a prog in which a functions returns a dict but when I try to iterate over the dict using iterkeys, It shows an error. I think its because only address of the dictionary is returned so cannot be iterated upon. Please suggest some way by which it can be made possible to iterate over the dictionary using iterkeys outside the function ? --14dae93408fffc4bff04da12ae3d Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
I have a prog in which a functions returns a dict but when= I try to iterate over the dict using iterkeys, It shows an error. I think = its because only address of the dictionary is returned so cannot be iterate= d upon.=A0

Please suggest some way by which it can be made possib= le to iterate over the dictionary using =A0iterkeys outside the function ?<= /div>
--14dae93408fffc4bff04da12ae3d--