Python函数返回值

return 用来把函数结果交回调用处。

def add(a, b):
    return a + b

如果函数没有写 return,默认返回None

相关:Python函数Python函数参数