55

8.3函数的return-小嘉欣的博客

 6 years ago
source link: http://blog.51cto.com/10777193/2072839
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
函数的return#-*-coding:utf-8-*-__date__='2018/2/2511:15'__author__='xiaojiaxin'__file_name__='函数返回值'defadd(*args):sum=0foriinargs:print(i)sum+=ireturn(sum)a=add(1,4,5)print(a)#不写return语句,默认语句为nonereturn里

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK