class Solution:
    def longestCommonPrefix(self, m) -> str:
        if not m:
            return ""
        shortest=min(m,key=len)
        for i, letter in enumerate(shortest):
            for j in m:
                if j[i] != letter:
                    return shortest[:i]
        return shortest

func=Solution()
strs = ["cir","car"]
print(func.longestCommonPrefix(strs))

8dd0f608f6ea628a5e0e11fb99d81edff38f2d88
<mask token>

class Solution:

    def longestCommonPrefix(self, m) ->str:
        if not m:
            return ''
        shortest = min(m, key=len)
        for i, letter in enumerate(shortest):
            for j in m:
                if j[i] != letter:
                    return shortest[:i]
        return shortest


<mask token>

class Solution:

    def longestCommonPrefix(self, m) ->str:
        if not m:
            return ''
        shortest = min(m, key=len)
        for i, letter in enumerate(shortest):
            for j in m:
                if j[i] != letter:
                    return shortest[:i]
        return shortest


<mask token>
print(func.longestCommonPrefix(strs))

class Solution:

    def longestCommonPrefix(self, m) ->str:
        if not m:
            return ''
        shortest = min(m, key=len)
        for i, letter in enumerate(shortest):
            for j in m:
                if j[i] != letter:
                    return shortest[:i]
        return shortest


func = Solution()
strs = ['cir', 'car']
print(func.longestCommonPrefix(strs))

class Solution:
    def longestCommonPrefix(self, m) -> str:
        if not m:
            return ""
        shortest=min(m,key=len)
        for i, letter in enumerate(shortest):
            for j in m:
                if j[i] != letter:
                    return shortest[:i]
        return shortest

func=Solution()
strs = ["cir","car"]
print(func.longestCommonPrefix(strs))
