(FYI) sample codes on the book: Python Machine Learning
If you want try to sample codes, goto github repository: https://github.com/rasbt/python-machine-learning-book .
You see *.ipynb files in code directory. These *.ipynb files must be open Jupyter notebook that is a kind of notebook app running on web browser. It can be installe via pip/conda easily. e.g., https://github.com/rasbt/python-machine-learning-book/blob/master/code/ch01/README.md .
If you are a Python beginner, maybe Thonny http://thonny.org is useful for understandings. Thonny supports “Step through expression evaluation” under debugging mode.