Learn Python the Hard Way, 3rd Edition, Zed Shaw's Hard WaySeries 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