def as_view(name: str, *class_args: int, **class_kwargs: str) -> int: return int(name) + class_args[1] + int(class_kwargs['k1']) print(as_view('1', 2, 3, 4, k1='5', k2='6')) print(type(as_view('1', 2, 3, 4, k1='5', k2='6'))) print(str(as_view('1', 2, 3, 4, k1='5', k2='6'))) print(type(str(as_view('1', 2, 3, 4, k1='5', k2='6'))))
9 <class 'int'> 9 <class 'str'>