On 7/22/14 5:49 PM, Chris Angelico wrote:
On Wed, Jul 23, 2014 at 7:42 AM, fl <rxjw...@gmail.com> wrote:
I enter the example lines of that website:


import pprint
board = [ [0]*8 ] * 8
pprint(board)

Flaw in the blog post: he didn't actually specify the import line.
What you actually want is this:

from pprint import pprint

Or use pprint.pprint(board), but you probably don't need anything else
from the module.

Ned, if you're reading this: Adding the import would make the post clearer. :)

Done.


ChrisA



--
Ned Batchelder, http://nedbatchelder.com

--
https://mail.python.org/mailman/listinfo/python-list

Reply via email to