Python的->int什么意思

Python的->int什么意思

def add(x, y) -> int:
  return x+y

一般出现在定义函数后面,为函数增加元数据,描述函数的返回类型

你可能感兴趣的:(Python,python)