A structured, day-by-day Python learning journal documenting progress through ~80+ concepts โ from bare-bones syntax to multithreading, async I/O, OOP design patterns, web scraping, and CLI tooling.
This repository tracks hands-on practice following the CodeWithHarry 100 Days of Python curriculum, with each day as a self-contained, runnable script.
Learning by doing. Every script in this repo was written from scratch โ the goal was to understand why each construct works, not just what it does. Topics escalate deliberately: the same building blocks that appear in Day 10 (loops, conditionals) resurface in Day 39 (quiz game), Day 47 (encoder/decoder), and Day 98 (concurrent downloads) โ showing how fundamentals compose into real programs.
Python-main/
โ
โโโ Day 1/ # Hello World, first variable
โโโ Day 2โ9/ # Core syntax: types, operators, typecasting, input
โโโ Day 10โ15/ # Strings, slicing, built-in methods, time module
โโโ Day 16โ19/ # Control flow: match/case, for/while, break/continue
โโโ Day 20โ30/ # Functions: args, kwargs, recursion, scope
โโโ Day 31โ35/ # Data structures: lists, tuples, sets
โโโ Day 36โ38/ # Exception handling: try/except/finally, raise
โโโ Day 39โ44/ # Projects + modules: quiz game, encoder, imports
โโโ Day 47โ54/ # File I/O, lambdas, map/filter/reduce
โโโ Day 56โ74/ # OOP: classes, inheritance, polymorphism, magic methods
โโโ Day 77โ86/ # Advanced OOP, CLI tooling, operator overloading
โโโ Day 87โ98/ # Concurrency: threading, asyncio, web scraping
โ
โโโ myfile.txt # Sample data used in file I/O exercises
โโโ sample.txt # Sample data used in file seek/truncate exercises
โโโ requirements.txt
| Day | Concept |
|---|---|
| 1โ4 | Variables, print(), basic data types (int, float, str, bool, complex) |
| 5 | Escape sequences, print() separators and end characters |
| 6 | Lists, tuples, dictionaries โ first look |
| 7โ8 | Arithmetic and assignment operators |
| 9 | Typecasting โ explicit (int(), float()) and implicit |
| 10 | input(), stdin handling, type conversion from user input |
| Day | Concept |
|---|---|
| 11 | String indexing, iteration, concatenation |
| 12 | Slicing with positive and negative indices |
| 13 | 15+ string methods: upper, lower, split, replace, find, index, count, startswith, endswith, isalpha, isalnum, isspace, swapcase, title, center |
| 28 | str.format() and f-strings with format specifiers (e.g. :.2f) |
| Day | Concept |
|---|---|
| 14 | if, elif, else โ including nested conditions |
| 15 | time.strftime for time-based branching |
| 16 | match/case (Python 3.10+ structural pattern matching) |
| 17 | for loops โ strings, lists, range() with step |
| 18 | while loop with else clause |
| 19 | break and continue |
| Day | Concept |
|---|---|
| 20 | Defining functions, return values, pass |
| 21 | Default args, *args (variadic positional), **kwargs (variadic keyword) |
| 29 | Docstrings โ __doc__ attribute |
| 30 | Recursion โ factorial, Fibonacci (conceptual) |
| 48 | Variable scope โ local vs global, global keyword |
| 52 | Lambda functions |
| 53 | Higher-order functions: map(), filter(), reduce() |
| 59 | Decorators โ wrapping functions, preserving args with *args/**kwargs |
| 92 | lru_cache โ memoization for expensive repeated calls |
| Day | Concept |
|---|---|
| 22โ23 | Lists โ comprehensions, sort, reverse, count, copy, insert, extend |
| 24โ25 | Tuples โ immutability, count(), index() with start/end bounds |
| 31โ32 | Sets โ creation, union, intersection, difference, symmetric_difference, issubset, issuperset, isdisjoint |
| 33โ34 | Dictionaries โ keys(), values(), items(), pop(), popitem(), update() |
| Day | Concept |
|---|---|
| 49 | Reading and writing files โ open(), modes (r, w, a), with statement |
| 50 | Parsing CSV-like text files line by line |
| 51 | seek(), tell(), truncate() for byte-level file control |
| Day | Concept |
|---|---|
| 36 | try/except โ catching ValueError, IndexError |
| 37 | finally block โ guaranteed execution regardless of outcome |
| 38 | raise โ manually throwing exceptions with custom messages |
| Day | Concept |
|---|---|
| 43โ44 | import, from x import y, import as, dir(), math module |
| 3, 43 | Third-party imports: pandas, hashlib |
| Day | Concept |
|---|---|
| 56โ57 | Classes, objects, class variables vs instance variables |
| 58 | __init__ constructor |
| 60 | @property and .setter for encapsulated attribute access |
| 61โ62 | Inheritance โ Programmer(Employee), protected members (_name) |
| 65 | @staticmethod โ utility methods without self or cls |
| 66 | Class variables, noOfEmployees counter pattern |
| 69โ70 | @classmethod โ alternate constructors, class-level state mutation |
| 71 | __dict__ introspection, help() |
| 72 | super() โ calling parent __init__ cleanly |
| 73 | Magic/dunder methods: __str__, __repr__, __len__, __call__ |
| 74 | Method overriding + super() in multi-level inheritance |
| 77 | Operator overloading โ __add__ for a custom Vector class |
| 78โ79 | Polymorphism (method overriding), multiple inheritance |
| 80 | MRO (Method Resolution Order) โ GoldenRetriever.mro() |
| 81 | Hybrid and hierarchical inheritance patterns |
| Day | Concept |
|---|---|
| 41 | Ternary operator |
| 42 | enumerate() with custom start index |
| 54 | None โ identity check (is) vs equality (==) |
| 84 | time.localtime(), time.strftime(), performance timing |
| 85 | argparse โ building a real CLI tool with positional + optional args |
| 86 | Walrus operator (:=, Python 3.8+) โ assignment inside expressions |
| 87 | shutil + os โ file/directory copy, move, remove, rmtree |
| 91 | Generators โ yield, lazy evaluation, memory efficiency |
| 95 | Regular expressions โ re.search, re.finditer, character classes, anchors |
| Day | Concept |
|---|---|
| 89 | Web scraping โ requests + BeautifulSoup, parsing HTML, extracting tags |
| 96 | asyncio โ async def, await, asyncio.gather() for concurrent HTTP |
| 97 | Threading โ threading.Thread, ThreadPoolExecutor, executor.map() |
| 98 | Multiprocessing โ ProcessPoolExecutor, concurrent file downloading |
A terminal recreation of Kaun Banega Crorepati (Who Wants to Be a Millionaire). Manages a question bank, prize ladder, quit-and-bank logic, and lifeline milestones. Demonstrates list-of-lists data modelling, loop control, f-string formatting, and stateful game logic โ entirely in the standard library.
A two-way string cipher. Short words are reversed; longer words have their first character rotated to the end with fixed random pads appended. Decoding reverses the exact transformation. Shows string slicing, join/split patterns, and conditional branching on string length.
A proper command-line tool built with argparse. Accepts a URL as a positional argument and an optional -o/--output filename flag. Streams large files in chunks using requests to avoid loading the full response into memory โ a real-world pattern used in production download utilities.
python main.py https://example.com/image.jpg -o output.jpgFetches a live webpage, parses the full HTML tree with BeautifulSoup, and extracts all <h2> headings. Includes a commented-out POST request example against a JSON API. Demonstrates real HTTP interaction against a live server, not mocked data.
Downloads 60 images in parallel using ProcessPoolExecutor. Handles directory creation, binary file writing, and exception isolation per worker โ a realistic pattern for batch data-fetching pipelines.
Requirements: Python 3.8+ (Days 86+), Python 3.10+ for match/case (Day 16)
Install dependencies:
pip install requests beautifulsoup4 pandasRun any day's script:
cd "Day 39"
python main.pyCLI tool (Day 85):
cd Day_85
python main.py https://picsum.photos/800/600 -o photo.jpgDays 1โ20 โโโโโโโโโโโโโโโโโโโโ Syntax, types, control flow, functions
Days 21โ40 โโโโโโโโโโโโโโโโโโโโ Data structures, recursion, first projects
Days 41โ60 โโโโโโโโโโโโโโโโโโโโ File I/O, modules, lambdas, decorators
Days 61โ80 โโโโโโโโโโโโโโโโโโโโ Full OOP โ inheritance, polymorphism, dunder methods
Days 81โ98 โโโโโโโโโโโโโโโโโโโโ Concurrency, CLI, async, regex, web scraping