A simple demo of dependent types in Idris is Vector, whose type depends on its value.
We can use type hints in Python:
from typing import List
I made a library which allows you to treat types as first-class, without hard-coding in advance like David said. Of course, it's hacky too, rewriting functions to make use of type hints.
https://github.com/vixrant/python-type-theory