From 94aba4df928718886de2b3fb403df60d16c1a328 Mon Sep 17 00:00:00 2001 From: Fudgerboy <91767657+Fudgerboy@users.noreply.github.com> Date: Mon, 20 May 2024 02:58:02 +0000 Subject: Sun, May 19, 2024, 7:58 PM -07:00 --- wk6/pset/dna/dna.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'wk6/pset') diff --git a/wk6/pset/dna/dna.py b/wk6/pset/dna/dna.py index 3110e4e..4c37abc 100644 --- a/wk6/pset/dna/dna.py +++ b/wk6/pset/dna/dna.py @@ -22,8 +22,11 @@ def main(): rows = [] with open(database) as file: reader = csv.DictReader(file) - for row in reader: - rows.append(row) + # Get the header (first line) + header = next(reader) + + # Get the rest of the data + rows = list(reader) # TODO: Read DNA sequence file into a variable text = 'sequences/' + sys.argv[2] -- cgit v1.2.3