Python Course

Course Modules we covered:

Introduction to Python

  • What is Python?
  • Why do people use Python?
  • Who uses Python today?
  • What can I do with Python?
  • How is Python developed and supported?
  • Features of Python

 Running a Python program

  • The Python Interpreter
  • The Python IDEs
  • Python implementation alternatives

Types and Operators

  • Introducing Core Data Types
  • Numbers and Strings
  • Lists and Sets
  • Dictionary and Tuples
  • Files
  • Other core types and operators

 Statements

  • Assignments and Expressions
  • The if statement
  • The if/else ternary expression
  • The while and for loops
  • Iterations and  comprehensions

Functions

  • Why use Functions?
  • Function definition and calls
  • Python scopes
  • The LEGB rule
  • The global statement
  • Scopes and nested functions
  • Closures: The factory functions
  • The nonlocal statement

Arguments

  • Passing arguments to Function
  • Keyword and Default arguments
  • Keyword only arguments
  • Writing your own print function

Advanced Function Topics

  • Recursive Functions
  • Anonymous Functions: lambdas
  • Functional programming tools: map, filter and reduce

Comprehensions and Generators

  • List Comprehensions
  • Generator functions
  • Generator expressions
  • Scopes and comprehensions variables
  • Set and Dictionary comprehensions

Bench marking

  • Timing iteration alternatives
  • Writing your own timing module
  • Timing module alternatives

Modules

  • Why modules?
  • Python program architecture
  • How import works
  • Module search path
  • Creating modules
  • Using modules
  • Module namespaces
  • Reloading modules

Packages

  • Introduction to package
  • Why use package imports?
  • Package relative imports
  • Pitfalls of package relative imports
  • Namespaces packages

 

Advanced Module concepts

  • Data hiding in modules
  • Understanding __main__ and __name__
  • Changing the module search path
  • Using as with import and from
  • Importing modules by Name String
  • Exposing the Modules further

Classes and OOPS     

  • Overview of OOP
  • Creating classes
  • Creating Instance Objects
  • Accessing attributes
  • Built-in class attributes
  • Method calls
  • Inheritance
  • Abstract superclasses
  • Nested classes

Operator Overloading

  • Introduction
  • Indexing and slicing: __getitem__ and __setitem__
  • Iterableobjects: __iter__ and __next__
  • Membership:__contains__,__iter__ and __getitem__
  • Attribute access: __getattr__ and __setattr__
  • String representation: __str__ and __repr__
  • Right side and in-place uses: __radd__ and __iadd__
  • Overloading comparasion operators
  • Boolean tests: __bool__ and __len__
  • Call expression: __call__
  • Object destruction: __del__

Advanced class topics

  • Container ship
  • The ‘New Style’ class model
  • Static and class methods
  • Instance count with static methods
  • The ‘Super’ function

Exception Handling

  • What is an Exception?
  • Handling an Exception
  • The try,except and else blocks
  • Except clause with no exception
  • Except clause with  multiple exceptions
  • The try-finally clause
  • Argument of an exception
  • Raising an exception
  • User defined exceptions
  • Built-in exception classes

Unicode and Byte Strings

  • Strings and Unicode Strings
  • Byte and Byte array objects
  • Text and Binary files
  • Unicode files
  • Pattern matching with re
  • Binary data module “struct”
  • Serializing objects with Pickle
  • XML parsing

Decorators

  • What is a decorator?
  • Function decorators
  • Class decorators

Metaclasses

  • What is a Metaclass?
  • The Metaclass model
  • Declaring Metaclasses
  • Coding Metaclasses
  • MetaclassVs Superclass
  • Metaclass methods Vs Class methods