Python 函数支持默认参数,以下是默认参数的Type Hints 写法,只需要将类型写到变量和默认参数之间即可。 def greeting(name: str = "world") -> str: ...
確定! 回上一頁