skip to main content
code

python typing practice

the thread through every rung

making tea for three

21 rungs

0 of 21start
  1. 01 · say something

    calling a function

    first time you type" ( )

  2. 02 · keep it in a name

    assignment

    first time you type= _

  3. 03 · more than one thing to say

    several arguments

    first time you type,

  4. 04 · a choice

    if and else, and the indent that follows

    first time you type: >

  5. 05 · go through a list

    a list, and a loop over it

    first time you type[ ]

  6. 06 · add them up

    arithmetic that accumulates

    first time you type+ - /

  7. 07 · a note to yourself

    a comment

    first time you type# *

  8. 08 · a name for a job

    def and return

    nothing new to reach for

  9. 09 · look things up

    a dict

    first time you type{ }

  10. 10 · words with values in them

    an f-string

    nothing new to reach for

  11. 11 · is it the same?

    equality and its opposite

    first time you type! <

  12. 12 · a list in one line

    a comprehension

    nothing new to reach for

  13. 13 · a quote inside a quote

    the other quote mark

    first time you type'

  14. 14 · when it goes wrong

    try and except

    nothing new to reach for

  15. 15 · a thing that holds its own state

    a class

    first time you type.

  16. 16 · asking things to do work

    methods

    nothing new to reach for

  17. 17 · every other one

    the remainder

    first time you type%

  18. 18 · arguments with names

    defaults and keywords

    nothing new to reach for

  19. 19 · say what goes in and out

    type hints

    nothing new to reach for

  20. 20 · wrap a function in another

    a decorator

    first time you type@

  21. 21 · the whole thing

    everything so far, doing one job

    nothing new to reach for