Classes, OOP, Tkinter general comments and detailed questions...
Robert Johnson
rjohnson at exotic-eo.com
Fri Apr 6 10:54:19 EDT 2001
"Ron Stephens" <rdsteph at earthlink.net> wrote in message
news:3ACBADAC.C7843F96 at earthlink.net...
> When he says
>
> self.buttons.append([None]*(NUMCRITERIA+1))
> self.strings.append([None]*NUMCRITERIA)
> self.score=[None]*NUMOPTIONS
>
> what does ([None]*(NUMCRITERIA + 1)) mean??? How can None times anything
> equal anything other than zero???
> and is [None] a list ?????? I know, a dumb question....
>
I don't know much about TKInter yet but it looks like he is creating a list
of lists containing [None].
For example, z=[None]*4
produces
[None,None,None,None]
Remember that you are dealing with a list and not 0. You are creating a
list with the contents repeated n times.
[1]*4=[1,1,1,1]
Wish I could help with the other questions.
Robert Johnson
More information about the Python-list
mailing list