Hello I was wondering why using **kwargs is not working in this example. I was following the answer as given in Alternating letter in python
def myfunc(**kwargs):
return "".join(w.upper() if i%2 else w.lower() for i,w in enumerate(kwargs))
I have tried calling the function as myfunc("skyscraper") but get the error:
TypeError: myfunc() takes 0 positional arguments but 1 was given
Its probably something simple but not obvious to me. In the exercise says I am not allowed to use print statements and the function as to return a string Thanks