Glossary · Phase 0 · Tools
Walrus operator
Python's := operator, which assigns a value and gives it back in one expression, as in while (answer := input()) != "done".
Try it now
Each box takes 3 items. Step through and watch the condition on line 3 checked before every pass, including the last check, which is false and ends the loop.
Learn it properly
While loops · Repeat until something changes: goals reached, answers valid, tasks done. About 35 minutes.
Other terms from the same lesson
- infinite loop: A loop whose stopping condition never becomes false, so it runs until something else stops it.
Never trained an AI?
Teach a small one to write, right in your browser. It takes about 20 seconds and needs no account.