正在加载图片...
Lambda Expressions Expressions that evaluate to functions! A function with parameter x that returns the value of xx >>> square lambdax:x *x >>square <function <lambda>...> >>square(4) 16 >>>×=square(5) >>>X 25Lambda Expressions Expressions that evaluate to functions! >>> square = lambda x: x * x A functionwith parameter x that returns the value of x * x >>> square <function <lambda> ... > >>> square(4) 16 >>> x = square(5) >>> x 25
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有