title: Finding a Shared Motif
body: <p>I need help with one problem in Rosalind here is the link to the problem for more information: <a href="http://rosalind.info/problems/lcsm/" rel="nofollow">http://rosalind.info/problems/lcsm/</a></p>
  
  <p>The following is the sample input:</p>
  
  <pre><code>&gt;Rosalind_1
  GATTACA
  &gt;Rosalind_2
  TAGACCA
  &gt;Rosalind_3
  ATACA
  </code></pre>
  
  <p>Sample output is :</p>
  
  <pre><code>AC
  </code></pre>
  
  <p>and that's the basic information of the input and output:</p>
  
  <blockquote>
  <pre><code>Given:  A collection of k (k≤100) DNA strings of length at most
          1 kbp each in FASTA format.
  
  Return: A longest common substring of the collection. (If multiple
          solutions exist, you may return any single solution.)
  </code></pre>
  </blockquote>
  
  <p>The problem is asking to find the longest shared string that is present in all three sequences, and the common longest string found in this example is <code>AC</code>.</p>
  
  <p>Now, moving to the issue with programming it. </p>
  
  <p>The idea I had - and tried - is to take the first string <code>GATTACA</code> and check all the combination of symbols and check if it is present in the sequence two and three. </p>
  
  <p>How can I do that to loop over all possible bases for all the three sequences and find the longest motif in python?</p>