title: find the longest common prefix string amongst an array of strings. If there is no common prefix, return an empty string ""
body: <p>find the longest common prefix string amongst an array of strings.
  If there is no common prefix, return an empty string &quot;&quot;
  I have tried to code this problem</p>
  <p>here is code:</p>
  <pre><code>class Solution:
      def longestCommonPrefix(self, strs: List[str]) -&gt; str:
          a=list(list(zip(*strs))[0])
          b=list(list(zip(*strs))[1])
          c=list(list(zip(*strs))[2])
          a1=&quot;&quot;
          i=0
          while(len(strs)):
              if(a[i]==b[i]==c[i]):
                  a1+=a[i]
                  return a1
  </code></pre>
  <p>I have tried to solve via extracting element from the list and then comparing with other elements.</p>
  <p>Don't know where it got struck no output is showing,
  please help!</p>