Walk through the dragon's gate into Python — every definition, every loop, every program. Hand-crafted lessons that make you understand, not just copy.
Definitions & Concepts
Every Python keyword, function and concept — explained with a tiny example.
Install & First Steps
Set up Python on Windows / Mac / Linux and run your very first program.
Search any program
From 'print 1 to 10' to neural nets — search any program and learn step-by-step.
Flatten [[1,2],[3,[4,5]]] into [1,2,3,4,5].
def flat(x):
for i in x:
yield from flat(i) if isinstance(i,list) else [i]Sign in to appear on the leaderboard.
collections.Counter turns 10 lines of counting into one.
Recommended
Affiliate links — we earn a small commission, you pay nothing extra.