nick-ulle/2015-python-course — pull request #16 by clarkfitzg (2014-07-04 03:38:56+00:00)
Title: a stats flavored example of iterators and lazy evaluation

I was thinking about the best way to teach iterators and lazy evaluation with core Python data structures. This shows up all over in Python 3- `zip`, `range`, `map`, file objects, etc.

This script is a work in progress, but I'm putting it out here to further the discussion about what to teach. Some of this may be too advanced.

Try running this line: `score_counts = collections.Counter(allhands())` and watch your computer's memory. The program uses less than 5 MB total on my computer, which is pretty rad. If you want to push it further you could pass something like `allhands(7)`.