An Outline to Mastery Python – Book Think Python

Learn Python

Recently I came across a wonderful book to learn python, Think Python by Allen B. Downey. Which has a great outline to follow on your way to mastery Python from zero. Also this outline is applicable for any programming language.


  • Installing Python or start on online environment like
  • Run your first program
  • Arithmetic operators
  • Values and Types
  • Formula and natural language

Variables, expressions and statements

  • Assignment statements
  • Variable names
  • Expressions and statements
  • Script mode
  • Order of operations
  • String operations
  • Comments


  • Function calls
  • Math functions
  • Composition
  • Adding new functions
  • Definitions and uses
  • Flow of execution
  • Parameters and arguments
  • Variables and parameters are local
  • Stack diagram
  • Fruitful functions and void functions
  • Why functions

Case Study: Interface Design

  • A turtle module
  • Simple repetition
  • Exercises
  • Encapsulation
  • Generalization
  • Interface design
  • Rafactoring
  • A development plan
  • Docstring

Conditionals and recursion

  • Floor division and modulus
  • Boolean expressions
  • Logical operators
  • Conditional execution
  • Alternative execution
  • Chained conditionals
  • Nested conditionals
  • Recursion
  • Stack diagrams for recursive functions
  • Infinite recursion
  • Keyboard input

Fruitful functions

  • Return values
  • Incremental development
  • Composition
  • Boolean functions
  • More recursion
  • Leap of faith
  • One more example
  • Checking types


  • Reassignment
  • Updating variables
  • The while statement
  • break
  • Square roots
  • Algorithms


  • A string is a sequence
  • len
  • Traversal with a for loop
  • String slices
  • Strings are immutable
  • Searching
  • Looping and counting
  • String methods
  • The in operator
  • String comparison

Case study: word play

  • Reading word lists
  • Exercises
  • Search
  • Looping with indices


  • A list is a sequence
  • Lists are mutable
  • Traversing a list
  • List operations
  • List slices
  • List methods
  • filter and reduce
  • Deleting elements
  • Lists and strings
  • Objects and values
  • Aliasing
  • List arguments


  • A dictionary is a mapping
  • Dictionary as a collection of counters
  • Looping and dictionaries
  • Reverse lookup
  • Dictionaries and lists
  • Memos
  • Global variables


  • Tuples are immutable
  • Tuple assignment
  • Tuples as return values
  • Variable-length argument tuples
  • Lists and tuples
  • Dictionaries and tuples
  • Sequences of sequences

Case study: data structure selection

  • Word frequency analysis
  • Random numbers
  • Word histogram
  • Most common words
  • Optional parameters
  • Dictionary subtraction
  • Random words
  • Markov analysis
  • Data structures


  • Persistence
  • Reading and writing
  • Format operator
  • Filenames and paths
  • Catching exceptions
  • Databases
  • Pickling
  • Pipes
  • Writing modules

Classes and objects

  • Programmer-defined types
  • Attributes
  • Rectangles
  • Instances as return values
  • Objects are mutable
  • Copying

Classes and functions

  • Time
  • Pure functions
  • Modifiers
  • Prototyping versus planning

Classes and methods

  • Object-oriented features
  • Printing objects
  • Another example
  • A more complicated example
  • The init method
  • The __str__ method
  • Operator overloading
  • Type-based dispatch
  • Polymorphism


  • Card objects
  • Class attributes
  • Comparing cards
  • Decks
  • Printing the deck
  • Add, remove, shuffle and sort
  • Inheritance
  • Class diagrams

Login or subscribe and download the book from the download page.

40 thoughts on “An Outline to Mastery Python – Book Think Python”

  1. You made a few fine points there. I did a search on the matter and found the majority of persons will have the same opinion with your blog. Leese Pinchas Quintana

  2. I’m not sure where you’re getting your info,
    but good topic. I needs to spend some time learning much more
    or understanding more. Thanks for excellent information I was looking for this info for
    my mission.

  3. Hello there, just became aware of your blog through Google, and found that
    it is truly informative. I am gonna watch out for
    brussels. I will be grateful if you continue this in future.
    A lot of people will be benefited from your writing.


  4. Hmm is anyone else having problems with the pictures on this blog loading?
    I’m trying to figure out if its a problem on my end or if it’s the blog.
    Any suggestions would be greatly appreciated.

  5. My spouse and I stumbled over here different web page and thought I might check things out.
    I like what I see so now i’m following you. Look forward to
    looking into your web page yet again.

  6. I was excited to find this great site. I wanted to thank you for ones time just for this fantastic read!! I definitely savored every part of it and I have you saved to fav to check out new information on your website. Inez Foss Garber

  7. Wow, awesome blog layout! How long have you been blogging for? you make blogging look easy. The overall look of your web site is excellent, let alone the content! Marylynne Herold Sergio

  8. Yes you are correct, truly PHP is a open source and its help we can take free from any community or website since it happens here at this web site. Jolyn Chariot Flowers

  9. thanks for the chance, i am a 4th year outstanding student at Addis Ababa University natural science stream studying biology. i will get my first degree just after four months from now. This is thus to ask your advise on how to get a master level study under your program. Min Brigg Jamilla

  10. You made some good points there. I checked on the web to learn more about the issue and found most people will go along with your views on this site. Nichole Gearalt Jayson

Leave a Comment

Your email address will not be published.