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使用问题
版权声明:除非特别标注,否则均为本站原创文章,转载时请以链接形式注明文章出处。
抱歉,评论功能暂时关闭!