Check out TypeAlias.
Complete code following the instructions, so that lines followed by
# expect-type-error
(if any) fail type check, while others can pass.
Hit the "▶️ Run" button to see result.
"""
TODO:
Create a new type called Vector, which is a list of float.
"""
Stuck? Check out solution
xxxxxxxxxx
def foo(v: Vector):
...
foo([1.1, 2])
foo(1) # expect-type-error
foo(["1"]) # expect-type-error