On Fri, 07 Apr 2017 10:01:21 +0200 Peter Otten <__pete...@web.de> wrote:
> > e = [None] * 6 , [None] * 2 > > In the above line you are creating a 2-tuple consisting of two lists: > > >>> [None]*6, [None]*2 > ([None, None, None, None, None, None], [None, None]) > > What you want is a list of lists > [ > [None, None], > [None, None], > ... > ] > > You can create such a list with > > >>> [[None] * 2 for _ in range(6)] > [[None, None], [None, None], [None, None], [None, None], [None, > None], [None, None]] > Thank you Peter, that makes sense. What I'm trying to do is convert a sudoku solver that I wrote using C++ and the QT library in 2005. As well as coming to grips with Tkinter I'm having trouble following my C++ code. -- Regards, Phil _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor