Consider following piece of code:
from collections import namedtuple point = namedtuple(\"Point\", (\"x:int\", \"y:int\"))
The Code above i
You can use typing.NamedTuple
From the docs
Typed version of namedtuple.
namedtuple
>>> import typing >>> Point = typing.NamedTuple("Point", [('x', int), ('y', int)])
This is present only in Python 3.5 onwards