from typing import NamedTuple fields = [("x", str), ("y", int)] nt = NamedTuple("name", fields)