One thing to note: I wrote:
year = [0] * 1000
Here's another way to get something equivalent:
year = []
for i in range(1000):
year.append(0)
Here, we do an explicit loop to append those thousand zeros into the
list. We'll end up with the same situation as before: year is a list
of zeros.
Why would we want to look at doing it this different approach?
See:
http://docs.python.org/2/faq/programming.html#how-do-i-create-a-multidimensional-list
for details.
Good luck!
_______________________________________________
Tutor maillist - [email protected]
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor