Learn Python 3 The Hard Way, by Zed A. Shaw code example
Example: Learn python 3 the hard way by by Zed Shaw
if you can't afford the book then download it for free by going to this link
https://www.pdfdrive.com/learn-python-3-the-hard-way-a-very-simple-introduction-to-the-terrifyingly-beautiful-world-of-computers-and-code-e195045215.html