Python
Python is easy to start and surprisingly deep to finish. These articles cover the everyday syntax, the standard-library tools that save real time, and the errors that stop beginners cold — each one explained by what Python is actually doing, not just what to type.
Core syntax
- *args and **kwargs: What the Stars Actually Mean The stars do two opposite things depending on where they appear. In a definition they collect; at a call they spread. Once that clicks, the syntax stops being mysterious. Tutorial · 8 min read · August 12, 2026
- pathlib: Working With Files Without String Concatenation Building file paths by joining strings works until your code meets a different operating system, or a folder with a space in it. pathlib removes the whole category of problem. Tutorial · 8 min read · August 12, 2026
- String Problems That Keep Coming Up in Interviews Most string interview questions are four patterns wearing different clothes. Learn the patterns and the individual problems stop needing to be memorised. Tutorial · 9 min read · August 11, 2026
- Tries: How Autocomplete Finds Every Word Starting With 'ca' A hash set can tell you whether a word exists. It cannot tell you which words start with 'ca' without checking all of them. That gap is what a trie fills. Tutorial · 8 min read · August 10, 2026
- Python JSON: load vs loads, and the Traps Between json.dumps on a datetime raises TypeError, and the default settings turn Hindi text into a wall of backslash-u escapes. Four functions, a handful of arguments, and a surprising number of ways to lose data. Tutorial · 10 min read · August 6, 2026
- Python Sets: Fast Lookups and the Order You Lose Checking if x in my_list inside a loop is the quiet way to turn a fast script into a slow one. Sets fix that in one line, and take away order and duplicates in exchange. Tutorial · 10 min read · August 6, 2026
- Python File Handling: Reading and Writing Files Safely Opening a file with the wrong mode deletes its contents before you write a single byte. That happens before any error you could catch. Tutorial · 10 min read · August 5, 2026
- Python enumerate and zip: Loop Like a Python Developer If your loop contains range(len(...)), Python has a better tool. These two functions replace most index juggling entirely. Tutorial · 8 min read · August 5, 2026
- Python Decorators Explained: Wrap Functions Like a Pro A beginner-friendly guide to Python decorators: functions as objects, closures, the @ syntax, functools.wraps, and decorators that take arguments. Tutorial · 9 min read · July 22, 2026
- Python *args and **kwargs: A Beginner-Friendly Guide A beginner-friendly guide to *args and **kwargs in Python: how each one collects arguments, how to unpack them, and how to order parameters correctly. Tutorial · 8 min read · July 22, 2026
- Python List vs Tuple: Differences and When to Use Each Lists change, tuples don't. See how Python lists and tuples differ in mutability, speed, memory, and hashability, plus exactly when to reach for each. Comparison · 8 min read · July 22, 2026
- How to Define and Use Functions in Python A beginner-friendly guide to writing Python functions — def, parameters, return values, defaults, keyword arguments, and a gentle look at *args and **kwargs. Tutorial · 9 min read · July 22, 2026
- Python String Methods Cheat Sheet (with Examples) A scannable cheat sheet of the Python string methods you use most, each with a tiny working example, plus f-strings for formatting. Tips & Tricks · 8 min read · July 22, 2026
Standard library and tooling
- Test-Driven Development: Writing the Test First, and Why Writing a test for code that does not exist sounds backwards. It turns out the order matters, because a test written first is a specification and a test written afterwards is often just a description of whatever you happened to build. Tutorial · 9 min read · August 21, 2026
- Virtual Environments and pip: Fixing the 'It Works on My Machine' Problem Installing packages globally works until two projects need different versions of the same library. Virtual environments cost thirty seconds per project and prevent an entire category of unexplainable failure. Tutorial · 8 min read · August 13, 2026
- collections and itertools: The Standard Library Most People Skip Most of the loops beginners write by hand already exist in the standard library, tested and faster. Two modules cover the majority of them. Tutorial · 9 min read · August 12, 2026
- Python Type Hints: Useful Documentation That Cannot Save You at Runtime Adding a type hint feels like adding a guarantee. It is not one — Python happily ignores it. What makes hints valuable is the tooling you point at them. Tutorial · 8 min read · August 11, 2026
- Unit Testing for Beginners: What to Actually Test A test that asserts a private helper was called will go red when you rename it and stay green when the feature breaks. Here is how to write tests that fail only when something is actually wrong. Tutorial · 9 min read · August 6, 2026
- Python datetime: Timezones, Formats and Naive Bugs datetime.now() gives you a timestamp with no timezone attached. Deploy that code on a UTC server and every time your Pune users see shifts by five and a half hours, with no error anywhere. Tutorial · 10 min read · August 6, 2026
- Python itertools: combinations, groupby and the Lazy Trap itertools.groupby does not group your data. It groups runs of consecutive equal keys, so unsorted input gives you the same key back three times and nobody warns you. Tutorial · 11 min read · August 6, 2026
- Python Type Hints: What They Do and What They Do Not You can annotate a parameter as int and pass it a string. Python will run the function happily. Type hints are documentation that a separate tool can check, and nothing more. Tutorial · 11 min read · August 6, 2026
- Python Logging: Why print() Is Not Enough logging.info() prints nothing on a fresh interpreter and never tells you why. The root logger defaults to WARNING, so your first three log lines vanish and you conclude logging is broken. Tutorial · 11 min read · August 6, 2026
- pytest for Beginners: Fixtures, Parametrize and CI pytest exits with a green-looking message when it finds no tests at all. If your file is not named test_something.py, your entire suite is invisible and you will not be told why. Tutorial · 12 min read · August 6, 2026
- Python ModuleNotFoundError: No Module Named — How to Fix You installed the package. Python still cannot find it. Almost always, pip and python are pointing at two different interpreters. Tutorial · 9 min read · August 6, 2026
- Python Virtual Environments: venv and pip Explained The step most tutorials skip, and the reason the same code runs on your machine and fails on someone else's. Tutorial · 9 min read · August 5, 2026
Going deeper
- Python async/await and asyncio, Explained Properly One time.sleep() call inside an async function freezes every other task in your program. Here is what await actually does, and why async speeds up network calls but not number crunching. Tutorial · 10 min read · August 6, 2026
- Python Dunder Methods: Make Your Class Feel Built-In You define __str__, print the object and it looks fine. Put the same objects in a list, print that, and you are back to angle brackets and memory addresses. Here is why, and what else dunder methods control. Tutorial · 10 min read · August 6, 2026
- Python Generators and the yield Keyword, Made Simple A beginner-friendly guide to Python generators: how yield makes functions lazy, how they save memory, and when to use them instead of lists. Tutorial · 9 min read · July 22, 2026
Fixing Python errors
- Python Exception Handling: try, except, else, finally Most beginners learn try/except as a way to make errors go away. That is exactly the wrong instinct, and it produces programs that fail silently instead of loudly. Tutorial · 9 min read · August 10, 2026
- Python KeyError, IndexError and AttributeError Explained Three errors, one root cause: you asked for something that is not there. The harder question is whether the missing thing is the bug, or only the symptom of one. Tutorial · 11 min read · August 6, 2026
- Python TypeError: Five Patterns and Their Real Causes Most TypeErrors are not about types at all. They are about a variable holding something you never intended to put there, one or two lines earlier. Tutorial · 11 min read · August 6, 2026
- Python IndentationError: Why It Happens and How to Fix It Python uses whitespace as syntax, so indentation is not style — it is structure. Most of these errors come from one invisible character. Tutorial · 8 min read · August 6, 2026
- Python Try Except: Handling Errors the Right Way A beginner-friendly guide to handling errors in Python using try, except, else and finally, plus catching specific exceptions and raising your own. Tutorial · 9 min read · July 22, 2026
More on Python
- Floating-Point Precision: Why 0.1 + 0.2 Is Not 0.3 Type 0.1 + 0.2 into any language's console and you get 0.30000000000000004. It is not a bug in that language; it is a direct consequence of storing decimal fractions in binary. Tutorial · 9 min read · September 15, 2026
- Base64 Encoding Explained: What It Is and What It Is Not Base64 shows up in data URIs, JWTs, email attachments, and API responses. It is a reversible mapping from bytes to text, nothing more, and treating it as a security measure is a common mistake. Tutorial · 8 min read · September 15, 2026
- Garbage Collection Explained: How Managed Languages Free Memory You never call free() in JavaScript or Python, yet memory gets reclaimed as the program runs. Here is how the collector decides what is garbage, and why your app can still leak. Tutorial · 9 min read · September 15, 2026
- FastAPI Basics: A Practical Introduction for Python Developers FastAPI turns ordinary Python type hints into request validation, JSON serialization, and interactive docs. Here is how the core pieces fit together - plus the async habit that quietly wrecks performance. Tutorial · 8 min read · August 23, 2026
- Flask Basics: Building Your First Python Web App Flask gives you routing and templating and then gets out of the way. Build a working app from the first route to forms and blueprints - and learn why 'working outside of application context' keeps showing up. Tutorial · 8 min read · August 23, 2026
- Django Basics: The Batteries-Included Python Framework Django hands you an ORM, an admin panel, auth, and migrations on day one. Here is how the pieces connect - and the query mistake that makes a fast framework feel slow. Tutorial · 9 min read · August 23, 2026
- Browser Automation: Testing What the User Actually Sees Automated browser tests catch things unit tests cannot. They are also the flakiest tests you will ever write, and almost all of that flakiness comes from one mistake. Tutorial · 9 min read · August 20, 2026
- Design Patterns: The Five You Will Actually Meet Design patterns are names for solutions people kept reinventing. Learning them as a catalogue to apply is how codebases get worse; learning them as names for things you already do is how they help. Tutorial · 10 min read · August 20, 2026
- Refactoring: Improving Code Without Breaking It Refactoring means changing how code is written without changing what it does. The second half of that sentence is the hard part, and it is why tests come first. Tutorial · 9 min read · August 20, 2026
- Class 12 Computer Science Board Exam: What to Revise and What to Skip The Class 12 Computer Science paper rewards a small set of skills very heavily. Knowing which ones, and which common mistakes cost marks in every batch, is worth more than another full syllabus read. Tips & Tricks · 12 min read · August 20, 2026
- Machine Learning Roadmap for Beginners: What to Learn and in What Order Most machine learning roadmaps start with three months of mathematics, which is why most people never reach the machine learning. Here is an order that gets you to a working model early and adds the theory where it is needed. Career · 11 min read · August 19, 2026
- Class 12 CS Practical and Viva: What They Actually Ask The practical exam is not testing whether you can invent a program under pressure. It is testing a short, predictable list of things, and the viva that follows is mostly asking you to explain the code in front of you. Tips & Tricks · 10 min read · August 18, 2026
- NumPy Basics: Why Arrays Beat Lists for Anything Numeric The first NumPy example everyone sees is multiplying an array by two. It looks like a pointless alternative to a list, until you see what a list actually does when you multiply it by two. Tutorial · 10 min read · August 17, 2026
- pandas for Beginners: The Ten Operations You Will Actually Use pandas has hundreds of methods and you will use about ten of them ninety percent of the time. Here are those ten, with real output, and the two behaviours that confuse everyone at the start. Tutorial · 11 min read · August 16, 2026
- OOP in Python Explained with Code You Can Actually Run Object-oriented programming is usually taught with cars and animals that never appear in real code. Here it is with programs you can paste into a file and run, including the one mistake that bites almost every beginner. Tutorial · 11 min read · August 15, 2026
- Final Year Project Ideas for CSE Students That You Can Actually Finish Most final year projects fail for the same reason: the idea was chosen to sound impressive in the synopsis, not to be finishable by two students in one semester. Here is how to choose one that survives both the deadline and the viva. Career · 11 min read · August 15, 2026
- Jupyter Notebooks: How to Use Them Without Creating a Mess Notebooks are the best tool there is for exploring data and one of the worst for building software. The difference is a single property most people never think about: execution order. Tutorial · 8 min read · August 14, 2026
- matplotlib Basics: Charts That Are Actually Readable matplotlib makes it easy to produce a chart and just as easy to produce a misleading one. The library is the small part; choosing the right chart and labelling it honestly is the rest. Tutorial · 9 min read · August 13, 2026
- Python dataclasses: Stop Writing __init__ by Hand A class that only holds data needs an __init__, a __repr__ and an __eq__, all of which repeat the field names three times. dataclasses write them from one declaration. Tutorial · 8 min read · August 11, 2026
- Python multiprocessing: Getting Real Parallelism Past the GIL Four threads on a CPU-bound task made this program very slightly slower. Four processes made it four times faster. The reason is one lock, and knowing which to reach for is the whole skill. Tutorial · 9 min read · August 11, 2026
- Web Scraping in Python: Getting Data Out of a Page Responsibly Scraping is easy to start and easy to do badly. The code is twenty lines; knowing when not to run it, and how not to get blocked, is the part worth learning. Tutorial · 9 min read · August 11, 2026
- The requests Library: Calling APIs Without the Sharp Edges requests makes HTTP calls a one-liner, which is why so much code using it has no timeout and no error handling. Two extra arguments prevent most of the trouble. Tutorial · 8 min read · August 11, 2026
- Context Managers: What 'with' Actually Does Everyone learns 'with open(...)' as the correct way to read a file without learning why. The mechanism underneath is small, and once you see it you start writing your own. Tutorial · 8 min read · August 11, 2026
- Python lambda, map, filter and reduce: When They Help and When They Hurt lambda and map look like the sophisticated way to write Python. Often they are, and often a comprehension is clearer. Knowing which is which is the actual skill. Tutorial · 8 min read · August 11, 2026
- Linked Lists in Python: Building One and Understanding Why Python has lists built in, so why build a linked list? Because the interview asks, and because the reversal problem teaches a pointer technique you will meet again and again. Tutorial · 9 min read · August 11, 2026
- Binary Search Trees: Fast Lookup Until Your Data Arrives Sorted A binary search tree gives you logarithmic lookup from one simple rule. The same rule is why inserting already-sorted data destroys its performance entirely. Tutorial · 9 min read · August 10, 2026
- Dijkstra's Algorithm: Shortest Paths, Step by Step Dijkstra answers the question every maps application asks: what is the cheapest route from here to everywhere? The algorithm is short, and the reason it fails on negative weights is worth understanding. Tutorial · 9 min read · August 10, 2026
- Greedy Algorithms: When Taking the Best Option Now Actually Works A greedy algorithm takes the best-looking option at every step and never reconsiders. Sometimes that is provably optimal. Sometimes it is confidently wrong, and the same code cannot tell the difference. Tutorial · 9 min read · August 10, 2026
- Bit Manipulation: The Tricks That Keep Appearing in Interviews Bit manipulation looks like a party trick until you meet the problems it solves in one line. A handful of patterns cover almost everything that gets asked. Tutorial · 8 min read · August 10, 2026
- Union-Find: Answering 'Are These Two Connected?' Almost Instantly Union-find does two things: merge two groups, and check whether two items are in the same group. With two small optimisations, both become effectively constant time. Tutorial · 8 min read · August 10, 2026
- Topological Sort: Ordering Things That Depend on Each Other Course prerequisites, build systems and task schedulers all ask the same question: given what depends on what, in what order should these run? Topological sort answers it, and tells you when no answer exists. Tutorial · 8 min read · August 10, 2026
- Recursion in Python: How to Stop Being Confused by It Recursion stops being confusing the moment you stop trying to trace it in your head. Trust the base case, trust the smaller call, and the rest follows. Tutorial · 9 min read · August 10, 2026
- Python collections: Counter, defaultdict, deque, namedtuple defaultdict is the most useful class in the module and the easiest one to get wrong. Simply reading a missing key adds it, so a lookup can silently grow your dictionary. Tutorial · 11 min read · August 6, 2026
- Python Cheat Sheet for Beginners The syntax you actually reach for, in one place — including the idioms that separate Python written by a Python developer from Python written in another language's accent. Tips & Tricks · 11 min read · August 6, 2026
- 12 Python Projects for Beginners (With What Each Teaches) Tutorial projects all look the same to a recruiter. What makes a project count is the part you added after the tutorial ended. Tips & Tricks · 12 min read · August 6, 2026
- Python Interview Questions for Freshers (With Answers) Interviewers probe the same handful of Python topics. Knowing why mutable defaults break is worth more than listing twenty built-in functions. Career · 12 min read · August 6, 2026
- OOP Interview Questions and Answers (Java, Python, C++) Every placement asks about the four pillars. The answers that stand out give a reason for each concept rather than a textbook definition. Career · 12 min read · August 6, 2026
- Python Dictionary Methods: A Beginner's Guide with Examples A beginner-friendly tour of the most-used Python dictionary methods, each with a runnable snippet, plus a word-frequency example and common mistakes. Tutorial · 9 min read · July 22, 2026
- Python Classes and Objects: OOP for Beginners A beginner-friendly intro to OOP in Python: classes, objects, __init__, self, methods, and a first look at inheritance, all with working code. Tutorial · 9 min read · July 22, 2026
- Python for Loop Explained with Examples A beginner guide to the Python for loop: range(), lists, strings, dictionaries, enumerate(), nested loops, break, continue and the else clause. Tutorial · 9 min read · July 22, 2026
- How to Reverse a String in Python (5 Easy Ways) Five beginner-friendly ways to reverse a string in Python — slicing, reversed() + join(), for loop, while loop, and recursion — with runnable code and a clear pick. Tutorial · 9 min read · July 22, 2026
- Python List Comprehension Explained with Examples A beginner-friendly guide to Python list comprehension — syntax, filtering, if-else, nested loops, and when a plain for loop is the better choice. Tutorial · 8 min read · July 22, 2026
- Java vs Python: Which Should You Learn First in 2026? An honest, beginner-friendly comparison of Java and Python — syntax, speed, jobs in India, and which one to learn first in 2026. Comparison · 9 min read · July 22, 2026
- DSA Roadmap for Beginners: How to Start in 2026 A step-by-step DSA roadmap for absolute beginners: the right topic order, how much time each stage takes, and the mistakes that waste months. Career · 9 min read · July 22, 2026
- Python vs JavaScript: Which Should You Learn First? An honest comparison on syntax, jobs, learning curve and where each one actually runs — plus which to pick depending on what you want to build. Comparison · 8 min read · May 7, 2026
- Python vs JavaScript: Which Should You Learn First? A detailed comparison of two of the most popular programming languages. We break down use cases, job market, and learning curve. Comparison · 8 min read · May 7, 2026
