Thanks

Thanks to all who posted answers to my question about what it means to use a * operator on a list (sequence) in Python.

Michael Bernstein pointed out that [0] is a list, not a dictionary, Zach found me the docs on python.org, and also wanted to know why I would write 2 * 2 instead of 4 (because I was quoting some code, replacing a variable name with its value), and mom says anything * 0 is 0…

But in Python, that may not be true. ;): Smile! I guess it depends on whether you think [0, 0, 0, 0] == 0.

Comments are closed.