webartifex / intro-to-python

An intro to Python & programming for wanna-be data scientists
https://code.webartifex.biz/alexander/intro-to-python
MIT License
912 stars 88 forks source link

Rearrange contents in chapter 8 #31

Open webartifex opened 3 years ago

webartifex commented 3 years ago

https://nbviewer.jupyter.org/github/webartifex/intro-to-python/blob/develop/08_mfr/01_content.ipynb

Move parts on list comprehensions into chapter 7 where list constructors are covered (or after the part on list methods because of .append()).

Move the nested and Cartesian product examples into exercises on their own.

Convert "Example: Averaging all even Numbers in a List (revisited)" section into a new section on "Streaming data".

Move tuple comprehensions part up into generator section.

Create new section on generator functions (make a unified generator section with expression and function as sub-section). Note that the numeric example is not the same as in the first content file.

webartifex commented 3 years ago

Include Fibonacci example for generators

Advantage: instead of single value, calculate entire Fibonacci sequence. Only works with iterative version.