moreati/pythondotorg — pull request #1 by benhoyt (2014-02-20 20:29:46+00:00)
Title: Better example of for looping through a list

I strongly feel 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, as I've shown.

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