python中的的fun和fun()的区别:

 

fun指的是函数本身

fun()指的是函数的返回值

def fun():
    return 1

a = fun

a = fun()

第一个a等于fun函数

第二个a等于1即fun函数返回的值

 

 

-----------------
扫码可以领美团优惠券

 

posted @ 2018-02-23 14:21  leeQQQ  阅读(12048)  评论(0编辑  收藏  举报