Language · Beginner to intermediate

Python, properly — a full course for placements

Twelve lessons that take you from how the interpreter works to the six patterns behind most coding-round questions. Written to be read once and remembered.

12 lessons 118 min of reading Free · no account

Why this course exists

Most Python tutorials teach you to make something work. A placement interview asks a different question: do you know why it works, and what happens at the edge? This course teaches the language at the depth where those two questions have the same answer — and it does not skip the parts that are boring to write.

What you need first
  • No programming experience assumed
  • Any computer with Python 3.10 or newer, or an online interpreter
Who it is for

Engineering students preparing for campus placements

What you will be able to do afterwards

  • Read and write idiomatic Python without reaching for a search engine
  • Say what happens in memory when you assign, copy or pass a list — the question that separates the top of the batch from the rest
  • Choose between a list, a tuple, a dict and a set on cost rather than on habit
  • Use comprehensions, generators and the standard library the way a working engineer does
  • Recognise which of the six standard patterns a coding-round question is really testing
  • Answer the twenty Python questions that come up in almost every technical round

The 12 lessons

Read in order, or jump to what you need.

01 How Python actually runs your code 8 min Source to bytecode to the interpreter loop, why Python compiles yet is called interpreted, and the one mental model that explains the rest of the language. 02 Numbers, types and truthiness 9 min Integers that never overflow, floats that cannot hold 0.1, is against ==, and what Python considers false — with the traps interviewers reach for. 03 Strings, and why they never change 10 min Immutability and what it costs, slicing, f-strings, the join idiom, and the string operations coding rounds keep asking for, with complexity for each. 04 Lists, tuples and the aliasing bug 10 min Why b = a does not copy a list, what shallow and deep copies mean, when a tuple is the right answer, and the cost of every list operation you will use. 05 Dictionaries and sets, and the hash table under them 10 min What hashing buys you, why dicts keep insertion order, the get and setdefault idioms, Counter and defaultdict, and how a set kills a quadratic loop. 06 Loops that read like the problem statement 9 min range, enumerate, zip, reversed and for-else — and why you should almost never write a C-style index loop in Python, plus what to do when you must. 07 Functions, scope and the mutable-default trap 10 min Positional and keyword arguments, star-args, the default argument that is evaluated once, the LEGB scope rule, closures, and where lambda is appropriate. 08 Comprehensions and generators 9 min List, dict and set comprehensions and when they stop being readable; generator expressions and yield; why a generator can read a file larger than memory. 09 Errors, files and modules 10 min try, except, else and finally in the right order; raising your own exceptions; the with statement; imports, __name__ and how Python finds a module. 10 Classes and objects in Python 11 min self, __init__ and the dunder methods that make your object behave like a built-in; class against instance attributes, inheritance and MRO, and properties. 11 The standard library that wins coding rounds 10 min collections, heapq, bisect, itertools, math and functools — the imports that turn thirty lines into five, plus fast input and the recursion limit. 12 Complexity, and the six patterns behind most rounds 12 min How to read the constraints for the intended complexity, then the six patterns: two pointers, sliding window, hashing, prefix sums, binary search, memo.

After the reading

This course has no quiz. The practice is real code.

You can finish every lesson here without an account, and you should. But reading about Python and writing it under a timer are different skills, and only one of them gets you through a coding round. That part needs a compiler, hidden test cases and somebody paying for the compute — so it lives inside the platform.

Python practice track

What the graded practice adds

Every concept in this course has graded problems inside PlacedElite — run against hidden test cases, with a recorded step-through of your code when it fails.

  • Graded problems per topic, unlocked in order
  • A recorded step-through of your run, line by line
  • Editorials that explain the approach, not the answer

Or keep reading free — the other courses are open too.

Also free

The other courses on this site

Free to learn · paid to be measured

Read the courses for nothing. Pay when you want to be marked.

Every lesson on this site is free and needs no account. What a subscription buys is the graded practice, the full-length mocks, the spoken AI interviews and a readiness score you can act on.