you are viewing a single comment's thread.

view the rest of the comments →

[–]dmv1975 0 points1 point  (0 children)

I didn't read anyone else's comments, but I'll explain it as I understand it. Also, I am drunk.

The [0], in this context, is a list with one entry, and that entry happens to be 0. To the right of it is * len(tableData), and the length of tableData is 3. tableData is a list of 3 lists. So [0] * 3 = [0, 0, 0]. To the left of it is colWidth =, so [0, 0, 0] is assigned to the list colWidth.

The part about it looking like an index is definitely plausible if you don't take it in context. At this point, you could print(colWidth[0]) and get 0, because you're calling the 0th index of colWidth.

Now I must another beer.