from typing import NewType
RGB = NewType("RGB", tuple[int, int, int])
Check
from typing import TypeVar
TypeVar ..... # < 3.12
===== Generische Typen =====
def funktion[T](items: list[T]) -> T: # ab 3.12