您可以在元组或列表中混合类型.为什么不能在输入提示时指定?
>>> from typing import Tuple, List
>>> t = ('a', 1)
>>> l = ['a', 1]
>>> t2: Tuple[str, int] = ('a', 1)
>>> l2: List[str, int] = ['a', 1]
TypeError: Too many parameters for typing.List; actual 2, expected 1
Run Code Online (Sandbox Code Playgroud)