I'm trying to map a function that takes 2 arguments to a list:
my_func = lambda index, value: value.upper() if index % 2 else value.lower()
import string
alphabet = string.ascii_lowercase
n = map(my_func, enumerate(alphabet))
for element in n:
print(element)
This gives me a TypeError: <lambda>() missing 1 required positional argument: 'value'.
What is the correct way to map my lambda onto this input?
lambdaarguments anymore.