你好,我想知道为什么在这个例子中使用**kwargs不起作用。我遵循了Alternating letter in python中给出的答案 def myfunc(**kwargs):
return "".join(w.upper() if i%2 else w.lower() for i,w in enumerate(kwargs)) 我试着调用这个函数作为myfunc(“摩天大楼”),但得到了错误: TypeError: myfunc() takes 0 positional arguments but 1 was given 这可能是一些简单但对我来说并不明显的事
Building paragraphs can be like building a skyscraper: there must be a well-planned foundation that supportsBuilding paragraphs can be like building a skyscraper: there must be a well-planned foundation that supportsBuilding paragraphs can be like building a skyscraper: th