def search(self, nums: List[int], target: int) -> int:
这是新增的语法,为了说明参数和返回值的数据类型。不过仅仅的给人看的。说明nums的数据类型是list ,target的类型是int。函数返回值是int类型
def search(self, nums: List[int], target: int) -> int:
这是新增的语法,为了说明参数和返回值的数据类型。不过仅仅的给人看的。说明nums的数据类型是list ,target的类型是int。函数返回值是int类型