classSolution:# @param strs: A list of strings# @return: The longest common prefixdeflongestCommonPrefix(self,strs):# write your code hereresult=""ifstrs==None:returnresultiflen(strs)==0:returnresultmin_len=sys.maxintmin_str=0foriinrange(len(strs)):ifmin_len>len(strs[i]):min_len=len(strs[i])min_str=iifmin_len==0:returnresultforiinrange(len(strs[min_str])):forindexinrange(len(strs)):ifstrs[min_str][i]!=strs[index][i]:returnresultresult+=strs[min_str][i]returnresult