7.1 函数的多返回值
一、函数多返回值
语法:
def func_name(): return 1, 2 x, y = fun_name()按照返回值的顺序,写对应顺序的多个变量接收即可
变量之间用逗号
,隔开支持不同类型的数据return
Last updated
Was this helpful?
语法:
def func_name():
return 1, 2
x, y = fun_name()按照返回值的顺序,写对应顺序的多个变量接收即可
变量之间用逗号
,隔开支持不同类型的数据return
Last updated
Was this helpful?
Was this helpful?