class Solution:
    def longestCommonPrefix(self , strs ):
        res = ''
        for items in zip(*strs):
            if len(set(items)) == 1:
                res += items[0]
            else:
                break
        return res