Version

For this course, Python homeworks and lectures will be based on Python version 3.5.2.

Lecture Outline

  1. Language Basics
  2. Language Basics II
    • Assignment and object references

      x = []
      y = x
      y.append('frog')
      print(x)
      
    • Operators
    • Control Structures: if / elif / else
    • Iterables
    • Loops: while / for
  3. Intermediate Python
  4. Intermediate Python
  5. Modules, classes, and more functions
    • Modules and importing
      • if __name__ == "__main__":
      • A simple example: m1.py and m2.py
      • A simple example using from: m1.py and m2.py
      • An interesting circular import example: m1.py and m2.py
    • Classes
    • Custom exceptions
    • String formatting
  6. Iterables
    • Argument lists and star magic
    • Generator functions
    • Generator expressions
      • Filtering with if
      • Multiple for’s
      • Nested generator expressions
    • List comprehensions
    • Dictionary comprehensions
  7. Higher Order Functions
    • Higher order functions
      • Functions as arguments to functions
      • Functions returned from functions
    • Lambda expressions
    • map, filter, and functools.reduce
    • Partial function application
    • Function decorators
  8. Decorators
    • Function decorators
      • @dec syntax
    • Packages
  9. Test and Wrap-up
    • Installing Libraries
    • PyPI (the Cheese Shop)
    • Virtual Environments
    • pip