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 154 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 11 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 12 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 13 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 13 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 13 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 12 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 13 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 12 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 13 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 14 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 13 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 15 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

Now write the code yourself.

You can finish every lesson here without an account. A coding round tests whether you can write it under a timer, so the practice runs your real code against hidden tests on PlacedElite. A free account opens the first modules of the Python course.

Python practice track

What the 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: the other courses are free too.

Also free

The other courses on this site

Start today

Your free account is one click away.

Continue with Google and try the courses, mock tests, resume builder and a live AI interview. No card needed.