title: Function not writing to .xls correctly . Python 2.7.1
body: <p>When I check my Excel file it only writes one line of data which is the last input.</p>
  
  <pre><code>def Table(fn,fe):
  
         for fseq in fn:
                count=0
                for k in fseq:
                       if k=='G' or k=='C':
                              count=count+1
                percentage=(float(count)/len(fseq))*100
                fin=open(fe,'w')
                table=str(fseq)+'\t'+str(count)+'\t'+str(percentage)+'\n'
                fin.write(table)
         return fe
  
  
  
  tablist=["AAUG","GCGA","AGCG","TCGA"]
  fout=Table(tablist, 'abc.xls')
  </code></pre>
  
  <p>It is supposed to output this:</p>
  
  <pre><code>   AAUG    1   25.0
     GCGA    3   75.0
     AGCG    3   75.0
     TCGA    2   50.0
  </code></pre>
  
  <p>Instead, my output looks like this:</p>
  
  <pre><code>   TCGA    2   50.0
  </code></pre>
  
  <p>and return the name of file being written.</p>
  
  <p>Why is it only writing data for the last element of the string? </p>