On Thu, Apr 28, 2011 at 11:23 AM, Thomas 'PointedEars' Lahn
<pointede...@web.de> wrote:
> You forgot a comma after the first `]', to separate the list elements.

Whoops! Apologies. It's very confusing when example code has silly
bugs in it! And yes, need to either back down the indices or insert a
shim. Memo, to self: Run the code through IDLE before posting it,
saves people a lot of trouble!

Incidentally, you're allowed to put the comma on the last item too:

 lists = [
  ['pig', 'horse', 'moose'],
  ['62327', '49123', '79115'],
]

Often makes for easier maintenance, especially when you append
array/list elements.

Chris Angelico
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to