Generics
Generics:
from typing import TypeVar, List
T = TypeVar('T')
def get_item(lst: List[T], index: int) -> T:
return lst[index]
from typing import TypeVar, List
T = TypeVar('T')
def get_item(lst: List[T], index: int) -> T:
return lst[index]