- Python编程300例:快速构建可执行高质量代码
- 李永华编著
- 89字
- 2021-03-26 23:33:23
例60 最长单词
1.问题描述
给一个词典,找出其中最长的单词。
2.问题示例
输入{"dog","google","facebook","internationalization","blabla"},输出:["internationalization"]。输入{"like","love","hate","yes"},输出["like","love","hate"]。
3.代码实现
4.运行结果
输入:['dog','google','facebook','internationalization','blabla']
输出:['internationalization']