Answers for "about map function in python"

2

mapping in python string

# mapping function
def uppercase(u):
    return str(u.upper())

map_iterator = map(uppercase,['a','b','c'])
mylist = list(map_iterator)
print(mylist)
Posted by: Guest on April-19-2020
4

map in python

map(function_to_apply, list_of_inputs)
Posted by: Guest on October-20-2020
-1

about map function in python

# Add two lists using map and lambda
  
numbers1 = [1, 2, 3]
numbers2 = [4, 5, 6]
  
result = map(lambda x, y: x + y, numbers1, numbers2,axis=1)
print(list(result))
Posted by: Guest on May-30-2021

Python Answers by Framework

Browse Popular Code Answers by Language