RockMom: “Music has power over me and all of us. It transcends time and place, changes perceptions. Surely those who would control others absolutely must forbid it.”
Month: <span>December 2001</span>
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. I guess it depends on whether you think [0, 0, 0, 0] == 0.
Comments closed
Comments closed