title: nested file read doesn't loop through all of the primary loop
body: <p>I have two files.<br />
  One file has two columns-let's call it <code>db</code>,  and the other one has one column-let's call it <code>in</code>.<br />
  Second column in <code>db</code> is the same type as the column in <code>in</code> and both files are sorted by this column.<br />
  db for example:</p>
  <pre><code>RPL24P3 NG_002525   
  RPLP1P1 NG_002526   
  RPL26P4 NG_002527
  VN2R11P NG_006060   
  VN2R12P NG_006061   
  VN2R13P NG_006062   
  VN2R14P NG_006063
  </code></pre>
  <p>in for example:</p>
  <pre><code>NG_002527
  NG_006062
  </code></pre>
  <p>I want to read through these files and get the output as follows:</p>
  <pre><code>NG_002527: RPL26P4
  NG_006062: VN2R13P
  </code></pre>
  <p>Meaning that I'm iterating on <code>in</code> lines and trying to find the matching line in <code>db</code>.<br />
  The code I have written for that is:</p>
  <pre><code>    with open(db_file, 'r') as db, open(sortIn, 'r') as inF, open(out_file, 'w') as outF:
          for line in inF:
              for dbline in db:
                  if len(dbline) &gt; 1:
                      dbline = dbline.split('\t')
                      if line.rstrip('\n') ==  dbline[db_specifications[0]]:
                          outF.write(dbline[db_specifications[0]] + ': ' + dbline[db_specifications[1]] + '\n')
                          break
  </code></pre>
  <p>*<code>db_specification</code> isn't relevant for this problem, hence I didn't copy the relevant code for it - the problem doesn't lie there.</p>
  <p>The current code will find a match and write it as I planned just for the first line in <code>in</code> but won't find any matches for the other lines. I have a suspicion it has to do with <code>break</code> but I can't figure out what to change.</p>