Python
Door Rajnarayan Yadav
1. Python Basics
1.1. What is Python? Features, use-cases. Python Interpreter & Script mode. Syntax rules (indentation, comments).
1.2. Data Types
1.2.1. Numbers (int, float, complex) Strings (str) Booleans (True, False) NoneType
1.3. Variables & Constants
1.4. Input/Output
1.4.1. (input(), print())
1.5. Type Casting
1.5.1. (int(), float(), str())
2. Operators
2.1. Arithmetic
2.1.1. (+, -, *, /, //, %, **)
2.2. Comparison
2.2.1. (==, !=, <, >, <=, >=)
2.3. Logical
2.3.1. (and, or, not)
2.4. Assignment
2.4.1. (=, +=, -=, *=, /=, etc.)
2.5. Identity
2.5.1. (is, is not)
2.6. Membership
2.6.1. (in, not in)
2.7. Operator precedence
3. Control Flow
3.1. Conditional Statements
3.1.1. if, if-else, if-elif-else Nested conditions
3.2. Loops
3.2.1. for loop (range(), iterables) while loop Nested loops
3.3. Loop Control
3.3.1. break continue pass
4. Data Structures
4.1. Strings
4.1.1. Indexing, slicing, immutability Common methods (upper(), lower(), split(), replace(), etc.)
4.2. Lists
4.2.1. Creation, indexing, slicing Methods (append(), insert(), remove(), pop(), sort(), reverse()) List comprehension
4.3. Tuples
4.3.1. Immutable sequences Packing/unpacking
4.4. Sets
4.4.1. Unique elements, set operations (union, intersection, difference) Methods (add(), discard())
4.5. Dictionaries
4.5.1. Key-value pairs Methods (get(), items(), keys(), values(), update(), pop()) Dictionary comprehension
5. Functions
5.1. Defining functions (def) Function arguments Positional, keyword Default arguments *args, **kwargs Return values Scope (local, global, nonlocal) Lambda functions (anonymous functions) Recursion
6. Modules & Packages
6.1. Importing (import, from ... import) Standard Library overview (math, random, os, sys, datetime) Creating your own module (.py files) Packages and __init__.py Virtual environments (venv)
7. File Handling
7.1. Open, read, write (open(), modes: r, w, a, rb, wb) File methods (read(), readline(), write(), close()) with open(...) as f: (Context managers) Working with directories (os module)
8. Error & Exception Handling
8.1. try, except Multiple except finally else with try Raising exceptions (raise) Custom exceptions (user-defined classes)
9. Object Oriented Programming (OOPs)
9.1. Classes and Objects __init__ constructor Attributes (class vs instance) Methods (self) Encapsulation (public, protected, private) Inheritance (single, multiple, multilevel, hierarchical) Method overriding super() Polymorphism Class methods (@classmethod) Static methods (@staticmethod) Magic / Dunder methods (__str__, __len__, __add__, etc.)
10. Advance Python Features
10.1. Iterators (iter(), next()) Generators (yield) Decorators (@decorator) Context Managers (with, __enter__, __exit__) Closures Property Decorator (@property)
11. Pythonic Concepts & Best Practices
11.1. List, Set, Dict comprehensions enumerate() zip() any(), all() map(), filter(), reduce() F-strings for formatting Unpacking (* and **) Type hints (def func(x: int) -> str:) __main__ guard (if __name__ == "__main__":) PEP 8 (style guide)
12. Standard Library (Deep Dive)
12.1. math, decimal, fractions collections (Counter, defaultdict, deque, namedtuple) itertools (infinite iterators, permutations, combinations) functools (lru_cache, partial) datetime, time os, sys json, pickle logging argparse
13. Concurrency & Parallelism
13.1. Multithreading (threading) Multiprocessing (multiprocessing) Async programming (async, await, asyncio) Global Interpreter Lock (GIL) basics
14. Memory Management & Internals
14.1. How Python manages memory Reference counting & garbage collection id(), is vs == Mutable vs immutable objects Python object model
15. Advanced Topics
15.1. Metaclasses Abstract Base Classes (abc module) Descriptors Slots (__slots__) Monkey patching Introspection (dir(), getattr(), hasattr()) Unit Testing (unittest, doctest, pytest)