combining lines of DNA
<p>I'll start by saying that I am very much a Python NEWBIE! I'm working on an assignment for my class, and we are to the part where we're on our own and are expected to do a few things that were weren't taught. That said:</p>

<p>I'm trying to combine multiple lines into a single line. I need this:</p>

<pre><code>&gt;taxon1
ACCGTGGATC
CCTATTGATT
GGATATTATC
</code></pre>

<p>To look like this:
taxon1 ACCGTGGATCCCTATTGATTGGATATTATC</p>

<p>I'm writing a python script and starting with:</p>

<pre><code>#!/usr/bin/python

import sys

if len(sys.argv) &lt; 2:
    print "usage: finalmyscript.py infile.txt"
    sys.exit(1)

fname = sys.argv[1]

handle = open(fname, "r")

for line in handle:
    handle.close()
</code></pre>
