python/pythondotorg — pull request #141 by benhoyt (2014-02-20 20:33:28+00:00)
Title: Better example of for looping through a list

I strongly believe examples should show best practices -- for summing numbers, it's Pythonic and much faster/simpler to use the built-in sum(). The example would be just as simple and show the same thing if it was changed to multiplying a list of numbers to get their product.

Also, my example doesn't shadow the builtins `sum` and `list`.