Python返回关键字 (Python return keyword)
return is a keyword (case-sensitive) in python, it is used to return a value (optional) to the calling function and transfers the control from called function to the calling function.
return是python中的一个关键字(区分大小写),用于将值(可选)返回给调用函数,并将控件从被调用函数转移到调用函数。
Syntax of return keyword
return关键字的语法
return [value]
Here, value is optional, if we do not want to return a value to the calling function, we can simply use a return to exit from the function.
在这里, value是可选的,如果我们不想将值返回给调用函数,我们可以简单地使用return退出该函数。
Example:
例:
# funct