the original code for map function on python code example
Example 1: pyhton map
def calculateSquare(n):
return n*n
numbers = (1, 2, 3, 4)
result = map(calculateSquare, numbers)
print(result)
# converting map object to set
numbersSquare = list(result)
print(numbersSquare)
Example 2: map function to change type of element in python
nums = ['3','4','7']
nums = list(map(int, nums))
print(nums)