summaryrefslogtreecommitdiff
path: root/wk6/pset/dna
diff options
context:
space:
mode:
Diffstat (limited to 'wk6/pset/dna')
-rw-r--r--wk6/pset/dna/test.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/wk6/pset/dna/test.py b/wk6/pset/dna/test.py
new file mode 100644
index 0000000..e540471
--- /dev/null
+++ b/wk6/pset/dna/test.py
@@ -0,0 +1,16 @@
+import csv, sys
+
+# Open the CSV file
+with open(sys.argv[1]) as csvfile:
+ # Create a CSV reader object
+ reader = csv.reader(csvfile)
+
+ # Get the header (first line)
+ header = next(reader)
+
+ # Get the rest of the data
+ data = list(reader)
+
+# Print the header and data to verify
+print("Header:", header)
+print("Data:", data)