Duration: 3 month's
Topics Covered:
1. Python Introduction
What is Python? (Interpreted, high-level, general-purpose)
History of Python (Guido van Rossum, Python 2 EOL in 2020)
Python 2 vs. Python 3 (key differences, print() vs print, Unicode)
Features: Dynamic typing, indentation-based syntax, cross-platform
Use Cases: Web Dev (Django/Flask), Data Science (Pandas), AI/ML (TensorFlow), Automation
Install Python 3.12+ (Windows/macOS/Linux)
IDE Setup: PyCharm vs VS Code vs Jupyter Notebook
Virtual Environments: venv and pip basics
Hello World: Script execution in IDE and terminal
Interpreter Workflow: .py → Bytecode → PVM (Python Virtual Machine)
Interactive Shell: REPL (Read-Eval-Print Loop)
.pyc Files: Bytecode caching for faster execution
Primitive: int, float, bool, str, None
Composite:
Mutable: list, dict, set
Immutable: tuple, frozenset, bytes
Type Checking: type(), isinstance()
Variable Assignment: Dynamic typing (a = 10 vs a = "hello")
Scope:
Local: Inside functions
Global: global keyword
Nonlocal: Nested functions (nonlocal keyword)
Object Identity: id() function, is operator
Arithmetic: +, //, **, %
Comparison: ==, is, in
Logical: and, or, not
Walrus Operator: := (Python 3.8+)
Keywords: async, await, yield, lambda
Rules: No symbols except _, case-sensitive
PEP8 Conventions:
snake_case for variables/functions
CamelCase for classes
UPPER_CASE for constants
Garbage Collection: Reference counting, cyclic garbage collector
Memory Optimization: Interning (a = 10; b = 10 → a is b → True)
Class Definition
Four Pillars:
Encapsulation: _protected and __private vars
Inheritance: class ElectricCar(Car):
Polymorphism: Method overriding
Abstraction: ABC (Abstract Base Classes)
Multiple Inheritance: class Child(Parent1, Parent2):
Diamond Problem: MRO (Method Resolution Order)
Magic Methods: __str__, __add__, __len__
Mixins: Reusable utility classes
Lists: nums = [1, 2, 3], slicing, list comprehensions
Tuples: Immutable coordinates = (4, 5)
Dictionaries: user = {"name": "Alice", "age": 30}
Sets: unique = {1, 2, 3}
Reading/Writing Files
Modes: r, w, a, rb (binary)
CSV/JSON: csv and json modules
Creating Modules: math_utils.py → import math_utils
Standard Library: os, sys, datetime, random
Third-Party Packages: pip install numpy
Lambda: square = lambda x: x ** 2
Map/Filter/Reduce
Decorators:
Web Scraper: requests + BeautifulSoup
REST API: FastAPI or Flask
Data Analysis: Pandas + Matplotlib