Ultimate Python Programming

Lessons
AI Tutor (Add-on)
Get A Free Trial

Skills You’ll Get

1

Preface

2

Introduction to Python

  • What makes Python so popular
  • Python implementation
  • Installing Python
  • Python Interactive Mode
  • Executing a Python Script
  • IDLE
  • Getting Help
3

Getting Started

  • Identifiers
  • Python Types
  • Objects
  • Variables and assignment statement
  • Multiple and Pairwise Assignments
  • Deleting a name
  • Naming convention for constants 
  • Operators
  • Augmented assignment statements
  • Expressions
  • Order of operations: Operator Precedence and Associativity
  • Type Conversion
  • Statements
  • Printing Output 
  • Getting user input
  • Complete programs
  • Comments
  • Indentation in Python
  • Container types
  • Mutable and Immutable Types 
  • Functions and methods
  • Importing
  • Revisiting interactive mode 
  • Errors
  • PEP8
  • Exercise
4

Strings

  • Indexing
  • Strings are immutable
  • String Slicing
  • String Concatenation and Repetition
  • Checking membership 
  • Adding whitespace to strings
  • Creating multiline strings
  • String methods
  • Case-changing methods
  • Character classification methods
  • Aligning text within strings 
  • Removing unwanted leading and trailing characters
  • Searching and replacing substrings
  • Chaining method calls
  • String comparison 
  • String conversions
  • Escape Sequences
  • Raw string literals
  • String formatting
  • String formatting using the format() method of string class
  • Representation of text - character encodings
  • Exercise 
5

Lists and Tuples

  • Accessing individual elements of a list by indexing 
  • Getting parts of a list by slicing
  • Changing an item in a list by index assignment
  • Changing a Portion of the list by slice assignment
  • Adding an item at the end of the list by using append()
  • Adding an item anywhere in the list by using insert()
  • Adding multiple items at the end by using extend() or +=
  • Removing a single element or a slice by using the del statement
  • Removing an element by index and getting it by using pop()
  • Removing an element by value using remove()
  • Removing all the elements by using clear()
  • Sorting a List 
  • Reversing a List
  • Finding an item in the list
  • Comparing Lists
  • Built-in functions used on lists
  • Concatenation and Replication
  • Using a list with functions from the random module
  • Creating a list
  • Using range to create a list of integers
  • Using the repetition operator to create a list of repeated values
  • Creating a list by splitting a string
  • Converting a list of strings to a single string using join()
  • List of Lists (Nested lists)
  • Copying a list
  • Shallow copy and deep copy
  • Repetition operator with nested lists
  • Tuples
  • Tuple packing and unpacking
  • Exercise
6

Dictionaries and Sets

  • Dictionaries
  • Adding new key-value pairs 
  • Modifying Values 
  • Getting a value from a key by using the get() method
  • Getting a value from a key by using the setdefault() method
  • Getting all keys, all values, and all key-value pairs
  • Checking for the existence of a key or a value in a dictionary
  • Comparing dictionaries 
  • Deleting key-value pairs from a dictionary
  • Creating a Dictionary at run time
  • Creating a dictionary from existing data by using dict()
  • Creating a dictionary by using the fromkeys() method
  • Combining dictionaries 
  • Nesting of dictionaries
  • Aliasing and Shallow vs. Deep Copy
  • Introduction to sets
  • Creating a set
  • Adding and Removing elements 
  • Comparing sets
  • Union, intersection, and difference of sets
  • Frozenset
  • Exercise
7

Conditional Execution

  • if statement
  • else clause in if statement
  • Nested if statements
  • Multiway selection by using elif clause
  • Truthiness
  • Short circuit behavior of operators and and or
  • Values returned by and and or operators
  • if else operator
  • Exercise
8

Loops

  • while loop
  • for loop
  • Nesting of Loops
  • Premature termination of loops using the break statement
  • continue statement
  • else block in Loops
  • pass statement
  • for loop vs. while loop
  • Exercise
9

Looping Techniques

  • Iterating in sorted and reversed order
  • Iterating over unique values
  • Index-Based for loops
  • Making in-place changes in a list while iterating 
  • Skipping some items while iterating
  • Using range and len combination to shuffle a sequence
  • enumerate function 
  • Iterating over multiple sequences using zip
  • Modifying a collection while iterating in a for loop
  • Infinite loop with break
  • Avoiding complex logical conditions using break
  • Exercise 
10

Comprehensions

  • List Comprehensions
  • if clause in list comprehension 
  • Ternary operator in list comprehension
  • Modifying a list while iterating 
  • Getting keys from values in a dictionary using list comprehension
  • Using list comprehensions to avoid aliasing while creating lists of lists
  • Multiple for clauses and Nested list Comprehensions
  • Extracting a column in a matrix 
  • Dictionary Comprehensions
  • Inverting the dictionary
  • Set Comprehensions
  • When not to use comprehensions
  • Exercise
11

Functions

  • Function Definition
  • Function call
  • Flow of control
  • Parameters and Arguments
  • No type checking of arguments
  • Local Variables
  • return statement
  • Returning Multiple Values
  • Semantics of argument passing
  • Default Arguments
  • Default arguments that could change over time
  • Positional and Keyword Arguments
  • Unpacking Arguments
  • Variable number of positional arguments
  • Variable number of keyword arguments
  • Keyword-only arguments
  • Positional-Only Arguments
  • Multiple Unpackings in a Python Function Call
  • Arguments and Parameters summary
  • Function Objects
  • Attributes of a function 
  • Doctrsings
  • Function Annotations 
  • Recursive Functions 
  • Exercise
12

Modules and Packages

  • Modules
  • Types of modules
  • Exploring modules
  • Creating and naming a new module
  • Importing a module
  • Importing all names from a module 
  • Restricting names that can be imported
  • Importing individual names from a module
  • Using an alias while importing
  • Documenting a module
  • Module search Path
  • Module object
  • Byte compiled version of a module
  • Reloading a module
  • Scripts and modules 
  • Packages
  • Importing a package and its contents
  • Subpackages
  • Relative imports 
  • Exercise
13

Namespaces and Scope

  • Namespaces
  • Inspecting namespaces
  • Scope
  • Name Resolution
  • global statement
  • nonlocal statement
  • Exercise
14

Files

  • Opening a File
  • File opening modes
  • Buffering
  • Binary and Text Files
  • Closing a file
  • with statement
  • Random Access
  • Using seek in text mode
  • Calling seek in append mode
  • Reading and writing to the same file
  • Reading a File using read()
  • Line oriented reading 
  • Writing to a file 
  • Redirecting output of print to a file
  • Example Programs
  • File Related Modules
  • Command Line Arguments
  • Storing and Retrieving Python objects using pickle
  • Exercise
  • Project : Hangman Game
15

Object Oriented Programming

  • Programming Paradigms
  • Introduction to object-oriented programming
  • Defining Classes and Creating Instance Objects
  • Adding methods to the class
  • Adding instance variables
  • Calling a method inside another method
  • Common pitfalls
  • Initializer
  • Data Hiding
  • Class Variables
  • Class and object namespaces
  • Changing a class variable through an instance
  • Class Methods
  • Creating alternative initializers using class Methods
  • Static Methods
  • Creating Managed Attributes using properties
  • Designing a class
  • Exercise
  • Project : Quiz creation
  • Project : Snakes and Ladders Game
  • Project : Log in system 
16

Magic Methods

  • Overloading Binary Arithmetic operators
  • Reverse methods
  • In-place methods
  • Magic Methods for comparison
  • Comparing objects of different classes
  • String representation of an instance object
  • Construction and destruction of objects
  • Making instance objects callable
  • Overloading type conversion functions
  • List of magic methods
  • Exercise
  • Project : Date Class
17

Inheritance and Polymorphism

  • Inheriting a class
  • Adding new methods and data members to the derived class 
  • Overriding a base Method 
  • Invoking the base class methods 
  • Multilevel Inheritance
  • object class
  • Multiple Inheritance
  • Method Resolution Order (MRO)
  • super and MRO
  • Polymorphism
  • Abstract Base classes
  • Composition
  • Exercise
18

Iterators and Generators

  • Iterables
  • Iterators
  • for loop Iteration Context – How for loop works
  • Iteration Tools
  • Iterator vs Iterable
  • Creating your own Iterator
  • Making your class Iterable
  • Some More Iterators
  • Lazy evaluation
  • itertools Module
  • Generators
  • Generator function vs Normal function 
  • Generator expressions
  • Exercise
19

Decorators

  • Prerequisites for understanding decorators
  • Introduction to decorators
  • Writing your first decorator
  • Applying your decorator to multiple functions
  • Automatic decoration syntax 
  • Decorator Example: Timer 
  • Decorator Example: Logger
  • Decorator Example: Counting function calls
  • Applications of decorators
  • Decorating functions that take arguments
  • Returning values from decorated functions 
  • Decorator Example: Checking return values
  • Decorator Example: Checking argument values
  • Applying Multiple Decorators
  • Preserving metadata of a function after decoration
  • General template for writing a decorator
  • Decorators with parameters
  • General template for writing a decorator factory
  • Decorator factory example
  • Applying decorators to imported functions 
  • Decorating classes
  • Class Decorators
  • Class Decorators with parameters
  • Exercise
20

Lambda Expressions and Functional Programming

  • Lambda expression
  • Comparing def statement and lambda expression 
  • Examples of lambda expressions 
  • Using Lambda expressions
  • Using lambda expressions for returning function objects
  • Lambda expressions as closures
  • Creating jump tables using lambda functions 
  • Using lambda expressions in sorted built-in function
  • Functional programming
  • map
  • map with multiple iterables
  • filter
  • Reducing an iterable 
  • Built-in reducing functions 
  • operator module
  • Exercise
21

Exception Handling

  • Types of Errors
  • Strategies to handle exceptions in your code
  • Error Handling by Python (Default exception handling)
  • Built-in Exceptions: Python Exceptions Class Hierarchy
  • Customized Exception Handling by using try…except 
  • Catching multiple exceptions using multiple except handlers and single except handler 
  • How to handle an exception
  • Guaranteed execution of finally block
  • else Block
  • Why do we need an else block
  • How to get exception details
  • Nested try statements
  • Raising Exception
  • Re-raising Exception
  • Chaining Exceptions
  • Creating your own exceptions in Python (Custom exceptions)
  • Assertions
  • Exercise
22

Context Managers

  • with statement
  • Implementing our own context manager
  • Exception raised inside with block 
  • Why we need with statement and context managers
  • Runtime context
  • Example: Sending output of a portion of code to a file
  • Example : Finding time taken by a piece of code
  • Using context managers in the standard library
  • Nested with statements and multiple context Managers
  • Implementing a context manager by using a decorator on a generator
  • Exercise

Ultimate Python Programming

$199.99

Buy Now

Related Courses

All Course
scroll to top