标签:type common style 前缀 com Fix 14. for 方法
import itertools class Solution(object): def longestCommonPrefix(self, strs): """ :type strs: List[str] :rtype: str """ prefix="" for i in itertools.izip(*strs): s= "".join(i) if len(s)!=s.count(s[0]): break prefix+=s[0] return prefix
标签:type common style 前缀 com Fix 14. for 方法
原文地址:https://www.cnblogs.com/xiao-xue-di/p/10292204.html