Skip to content

Instantly share code, notes, and snippets.

View sayan01's full-sized avatar
👨‍💻

Sayan Ghosh sayan01

👨‍💻
View GitHub Profile
@sayan01
sayan01 / dna.py
Created December 20, 2020 10:09
dna.py for CS50
# first arg = database csv
# second arg = sequence
import csv
from sys import argv, exit
# if user does not adhere to usage, quit
if len(argv) != 3:
print("Usage: python dna.py data.csv sequence.txt")
exit(1)
# open the passed files and close them after work done
with open(argv[1]) as dataf, open(argv[2]) as seqf: