不简单的python- 02函数类异常处理

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了不简单的python- 02函数类异常处理相关的知识,希望对你有一定的参考价值。

定义一个函数:

def a():
	print 123
a()
def b():
	return ‘123‘
b = b()
print b
def c(h1):
	return 15*h1
c = c(2)
print c
def d(h1=2):
	return 15*h1
d = d()
print d

lambda表达式:

fun = lambda x:x*x-X

fun(3)

6


以上是关于不简单的python- 02函数类异常处理的主要内容,如果未能解决你的问题,请参考以下文章