Python Loops and List Comprehension
For loops, while loops, enumerate, zip — and the comprehension syntax that replaces about eighty percent of the loops you were about to write.
Done Beginner ReadFree video courses and deep written tutorials in Python, PHP, Ruby, C#, Racket and interview prep. Every lesson gets working code on your screen in the first five minutes — then explains why it works.
# Learn Python #3 — comprehensions
catalogue = [
{"title": "Intro to Python", "views": 197},
{"title": "Python Loops", "views": 381},
{"title": "Racket Install", "views": 696},
]
popular = [v["title"] for v in catalogue if v["views"] > 200]
total = sum(v["views"] for v in catalogue)
print(f"{len(popular)} hits out of {len(catalogue)}")
print(f"{total} lessons watched. Your turn.")# Intro to Ruby — blocks and iterators
LESSONS = %w[python php ruby csharp racket].freeze
LESSONS.each_with_index do |track, i|
puts format("%02d %-8s ready", i + 1, track)
end
shipped = LESSONS.map(&:capitalize)
.select { |name| name.length > 3 }
puts "Tracks live: #{shipped.join(', ')}"<?php
declare(strict_types=1);
function e(string $value): string {
return htmlspecialchars($value, ENT_QUOTES, 'UTF-8');
}
$name = trim($_POST['name'] ?? 'world');
?>
<h1>Hello, <?= e($name) ?>!</h1>
<p>Served by your own machine. Lesson 1 done.</p>Pick the one that matches where you are, not where you think you should be. Every track assumes you have written no code at all.
Start here if you have never written a line of code.
BeginnerBuild a real website that talks back.
BeginnerThe language that reads like a sentence.
BeginnerDrag, drop, and ship a desktop app.
BeginnerRewire how you think about code.
BeginnerThe three languages every browser speaks.
All levelsThe ideas that outlive any one language.
IntermediateThink out loud, then write the code.
The videos show you the motion. The tutorials give you the detail. The challenges are where it becomes yours.
Six of them, each starting from absolute zero. Python if you have never coded; interview prep if you are getting ready to be hired.
Every video has a written tutorial here — same material, but searchable, copy-pasteable and easy to keep open while you work.
Each lesson ends with a challenge that has no solution posted. That is deliberate. Struggling with it is the part that teaches you.
Full lessons with runnable code, the gotchas nobody mentions, and a challenge at the end.
All 14 tutorialsFor loops, while loops, enumerate, zip — and the comprehension syntax that replaces about eighty percent of the loops you were about to write.
Done Beginner ReadValidate on the client for speed, validate on the server for safety — and understand exactly why skipping the second one gets you hacked.
Done Beginner ReadA graph problem in disguise. Reframe trust as in-degree and out-degree and a fiddly problem collapses into ten lines and a single pass.
Done Easy ReadShort, dense, and built around one idea each. No thirty-minute intro before the first line of code.
All 15 videosBlocks, each, map, select, times and upto — why Ruby almost never needs a C-style for loop.
Install Python, meet the REPL, and write your first program that takes input and does something with it.
Strings, numbers, lists, dictionaries and functions — the toolkit every later lesson assumes you have.
The longest lesson on the channel, and the one that pays off most: loops, enumerate, zip, and comprehensions.
Pattern matching without the fear. Search, match, groups, and the handful of symbols worth memorising.
Get a real web server running on your own machine and serve your first dynamic page.
107 short articles that open with the answer, show working code, and get out of the way. No preamble, no life story.
Browse all 107 answersinput() cannot know what you meant, so it always hands back text. Convert it the moment it arrives.
2 min ReadThree lines with flexbox, two with grid. Both directions, no hacks.
2 min ReadSyntax over promises that lets asynchronous code read top to bottom.
2 min ReadA white screen is a fatal error with error display turned off. Two lines make it visible.
2 min ReadHow the work grows as the input grows. Six classes cover almost everything you will meet.
2 min ReadFour commands, depending on whether you want to keep the changes and whether it is pushed.
2 min ReadCoding with Dom is the free, open-to-everyone arm of the Academy of Computer Science — the same curriculum philosophy, none of the gatekeeping. No account, no trial, no upsell at lesson four.