Project: 0x00. Python - Variable Annotations

Resources

Read or watch:

Learning Objectives

General

  • Type annotations in Python 3
  • How you can use type annotations to specify function signatures and variable types
  • Duck typing
  • How to validate your code with mypy

Tasks

Task File
0. Basic annotations - add 0-add.py
1. Basic annotations - concat 1-concat.py
2. Basic annotations - floor 2-floor.py
3. Basic annotations - to string 3-to_str.py
4. Define variables 4-define_variables.py
5. Complex types - list of floats 5-sum_list.py
6. Complex types - mixed list 6-sum_mixed_list.py
7. Complex types - string and int/float to tuple 7-to_kv.py
8. Complex types - functions 8-make_multiplier.py
9. Let's duck type an iterable object 9-element_length.py