python遍历输出列表中最长的单词
具体代码:
word_len_list = [len(word) for word in list]
max_word_len = max(word_len_list)
for word in list:
if len(word) == max_word_len:
#print(word)
list = []
python遍历输出列表中最长的单词
具体代码:
word_len_list = [len(word) for word in list]
max_word_len = max(word_len_list)
for word in list:
if len(word) == max_word_len:
#print(word)
list = []