11、函数与函数式编程

1、介绍

2、过程和函数

过程(没有返回值的函数)

def func2():
    '''test2'''
print('in the funk')

函数

def func1():
    '''testing function'''
    print('in the func1')
    return 0

调用:

x=func1()
y=func2()#y的值时None

猜你喜欢

转载自www.cnblogs.com/LittleSpring/p/9344579.html
今日推荐