python遍历输出列表中最长的单词-Python教程

资源魔 62 0

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教程

以上就是python遍历输入列表中最长的单词的具体内容,更多请存眷资源魔其它相干文章!

标签: Python 列表 python教程 python编程 python使用问题

抱歉,评论功能暂时关闭!