class Solution:
def longestCommonPrefix(self, strs: List[str]) -> str:
ans=''
for i in list(zip(*strs)):
if len(set(i))==1:
ans+=i[0]
else:
break
return ans
class Solution:
def longestCommonPrefix(self, strs: List[str]) -> str:
ans=''
for i in list(zip(*strs)):
if len(set(i))==1:
ans+=i[0]
else:
break
return ans