Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python anonymous function

def sum ( a, b ):			# non anonymous
        return a+b
print (sum(1, 2))			# 3

sum = lambda a,b: (a+b)		# anonymous / lambda
print (sum(1, 2))			# 3
 
PREVIOUS NEXT
Tagged: #python #anonymous #function
ADD COMMENT
Topic
Name
4+6 =