Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed4a.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.004 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'subject:not': 0.03; 'tutorial': 0.03; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'subject:Why': 0.09; 'url:blog': 0.10; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'wrote:': 0.18; 'module': 0.19; 'example': 0.22; 'import': 0.22; 'header:User-Agent:1': 0.23; 'header:X-Complaints-To:1': 0.27; 'header:In-Reply-To:1': 0.27; 'function': 0.29; 'lines': 0.31; 'invoke': 0.31; 'at:': 0.34; 'board': 0.35; 'subject:?': 0.36; 'hi,': 0.36; 'to:addr :python-list': 0.38; 'pm,': 0.38; 'to:addr:python.org': 0.39; 'skip:p 20': 0.39; 'received:org': 0.40; 'read': 0.60; 'name': 0.63; 'within': 0.65; 'website:': 0.67; 'received:pacbell.net': 0.84 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: emile Subject: Re: Why does not pprint work? Date: Tue, 22 Jul 2014 14:51:07 -0700 References: <6e09bc9c-d510-4076-b20d-32df796ca59e@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: adsl-69-226-129-65.dsl.pltn13.pacbell.net User-Agent: Mozilla/5.0 (X11; Linux i686; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 In-Reply-To: <6e09bc9c-d510-4076-b20d-32df796ca59e@googlegroups.com> 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: 39 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1406065896 news.xs4all.nl 2927 [2001:888:2000:d::a6]:39311 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:75028 On 07/22/2014 02:42 PM, fl wrote: > Hi, > > I read web tutorial at: > > http://nedbatchelder.com/blog/201308/names_and_values_making_a_game_board.html > > I enter the example lines of that website: > > > import pprint > board = [ [0]*8 ] * 8 > pprint(board) > > pprint is a module name -- you need to invoke the pprint function from within the pprint module: pprint.pprint(board) or alternately, from pprint import pprint pprint(board) or, as I sometime do from pprint import pprint as pp pp(board) Emile