Backend development

Stage 1 · Lesson 5 of 10

Type hints

Your language and how HTTP works

are labels that say what a function takes and returns, for example def find_user(user_id: int) -> User | None. Python itself ignores them when the code runs. Tools like mypy or Pyright check them for you, and your editor uses them to suggest code.

They matter more in backend work than almost anywhere. That is because and read them to check incoming requests and to write your automatically. Learn the built-in generic types such as list[str] and dict[str, int], the X | None form for a value that may be missing, TypedDict and . Add hints as you write, rather than bolting them on later.

Common trapassuming a hint enforces anything by itself: without a checker or a library like Pydantic, a wrong type passes silently.

A question to check yourself, an AI practice session and 1 cheat sheet entry come with the full roadmap. Unlock

Resources for this stage

Start with· follow one of these

Practise

  • Your language track: small exercises with free mentor feedback on idiomatic code

Keep handy

  • Quick syntax lookups for your language when you forget how something is written

  • Read the HTTP overview, methods, headers and status code pages until they feel obvious

Also worth your time

Mark this stage as not done?