Share
map to add strings
Question
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Add ( “i”, “love”, “python”) and (“just”, “the”, “most”)
using map()
Answers ( 2 )
def adds(a,b):
return a+b
a=map(adds, (“i”, “love”, “python”), (“just”, “the”, “most”))
def myfunc(a,b):
return a + b
x = map(myfunc, (“i”, “love”, “python”), (“just”, “the”, “most”))