<分区>
我正在尝试在 python 上做一个练习(我的版本是 python33 练习内容如下:
Write a function find_longest_word1() that takes a list of words and returns the length of the longest one. Use only higher order functions.
我的尝试是:
def find_longest_word1(a):
out = max(list(map(len,a)))
print (out)
find_longest_word1(["This","is","a","listing"])
我得到的错误是:
max() missing 1 required positional argument 'b'
我已经传递了一个列表作为参数。我是否需要为 max 函数提供一些其他参数?