Advanced Python 3 (3 Day Course) Training

Answers to Popular Questions:

 
Yes, this class can be tailored to meet your specific training needs.
Yes, we provide Python consulting services.
Yes, group discounts are provided.

Course Description

 
In this Python training course, students already familiar with Python programming will learn advanced Python techniques such as: IPython Notebook; the Collections module; mapping and filtering; lamba functions; advanced sorting; working with regular expressions; working with databases, CSV files, JSON and XML; writing object-oriented code; testing and debugging; and learning about Unicode and text encoding. This advanced Python course is taught using Python 3, however, differences between Python 2 and Python 3 are noted.
Course Length: 3 Days
Course Tuition: $1190 (US)

Prerequisites

Basic Python programming experience. In particular, you should be very comfortable with: working with strings; working with lists, tuples and dictionaries; loops and conditionals; and writing your own functions. Exposure to HTML, XML, JSON, and SQL would be useful.

Course Outline

 
IPython Notebook
Getting Started with IPython Notebook
Exercise 1: Creating Your First IPython notebook
Exercise 2: More Experimenting with IPython Notebook
Getting the Class Files
Markdown
Magic Commands
Automagic
Autosave
Directory Commands
Bookmarking
Command History
Last Three Inputs and Outputs
Environment Variables
Loading and Running Code from Files
Shell Execution
More Magic Commands
Getting Help
 
Advanced Python Concepts.....
Advanced List Comprehensions
Quick Review of Basic List Comprehensions
Multiple for Loops
Exercise 3: Rolling Five Dice
Collections Module
Named Tuples
Default Dictionaries (defaultdict)
Exercise 4: Creating a defaultdict
Counters
Exercise 5: Creating a Counter
Mapping and Filtering
Map (function, iterable)
Filter (function, iterable)
Lambda Functions
Using Lambda Functions with map() and filter()
Mutable and Immutable Built-in Objects
Strings are Immutable
Lists are Mutable
Sorting
Sorting Lists in Place
The sorted() Function
Exercise 6: Converting list.sort() to sorted(iterable)
Sorting Sequences of Sequences
Sorting Sequences of Dictionaries
Unpacking Sequences in Function Calls
Exercise 7: Converting a String to a datetime.date Object
Modules and Packages
Modules
Packages
Search Path for Modules and Packages
 
Regular Expressions
Regular Expression Syntax
Try it
Backreferences
Python's Handling of Regular Expressions
 
Working with Data
Relational Databases
PEP 0249 -- Python Database API Specification v2.0
PyMySQL
Returning Dictionaries instead of Tuples
sqlite3
Exercise 8: Querying a SQLite Database
Passing Parameters
SQLite Database in Memory
Executing Multiple Queries at Once
Exercise 9: Inserting File Data into a Database
CSV
Reading from a CSV File
Finding Data in a CSV File
Exercise 10: Comparing Data in a CSV File
Creating a New CSV File
CSV Dialects
Getting Data from the Web
The Requests Package
Beautiful Soup
XML
Exercise 11: Requests and Beautiful Soup
JSON
 
Classes and Objects
Attributes
Behaviors
Classes vs. Objects
Everything Is an Object
Creating Custom Classes
Attributes and Methods
Exercise 12: Adding a roll() Method to Die
Private Attributes
Properties
Exercise 13: Properties
Objects that Track their Own History
Documenting Classes
Using docstrings
Exercise 14: Documenting the Die Class
Inheritance
Overriding a Class Method
Extending a Class
Exercise 15: Extending the Die Class
Extending a Class Method
Exercise 16: Extending the roll() Method
Static Methods
Class Attributes and Methods
Class Attributes
Class Methods
You Must Consider Subclasses
Abstract Classes and Methods
Understanding Decorators
 
Testing and Debugging
Testing for Performance
time.perf_counter
The timeit Module
The unittest Module
Unittest Test Files
Exercise 17: Fixing Functions
Special unittest.TestCase Methods
Assert Methods
 
Unicode and Encoding
Bits and Bytes
Hexadecimal Numbers
Exercise 18: Converting Numbers between Number Systems
hex(), bin(), ord(), chr(), and int()
Encoding
Encoding Text
Encoding and Decoding Files in Python
Converting a File from cp1252 to UTF-8
Exercise 19: Finding Confusables

Course Directory [training on all levels]

Upcoming Classes