Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

Double all numbers using a map() Function

# welcome to softhunt.net
def addition(a):
	return a + a

# We double all numbers using map()
num = (10, 20, 30, 40)
ans = map(addition, num)
print(list(ans))
Source by softhunt.net #
 
PREVIOUS NEXT
Tagged: #Double #numbers #Function
ADD COMMENT
Topic
Name
6+1 =