Original Sources:
Used in this file:
Typically you want to use the map function to convert one list, most likely a tuple to another tuple, using a function:
~ Ex.:
a = (1,2,3,4,5)
b = map(lambda x: x**2, a)
#b = <map object at 0x...> #Generator
b = tuple(b)
#b = (1,4,9,14,25)~Ex.:
a = (1,2,3,4)
b = ("a","b","c","d")
c = tuple(map(lambda x, y: str(x)+str(y), a,b))
#c = ("1a","2b","3c","4d")Why not use a for loop
You can use a for loop, or a list comprehension, to do the same thing, tho the map function is a more functional way.