Skip to content

Instantly share code, notes, and snippets.

@Vini2
Last active September 23, 2020 15:20
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Vini2/709b1045f729cd3a6bac4fe5f25eabc0 to your computer and use it in GitHub Desktop.
Save Vini2/709b1045f729cd3a6bac4fe5f25eabc0 to your computer and use it in GitHub Desktop.
# Read the file and get the DNA string
file = open('sample_dna.txt', 'r')
dna = file.read()
# Print the original DNA string
print "DNA String: ", dna
# Print the count of each letter
print "Count of A: ", dna.count("A")
print "Count of C: ", dna.count("C")
print "Count of G: ", dna.count("G")
print "Count of T: ", dna.count("T")
# End of program
@Vini2
Copy link
Author

Vini2 commented Aug 11, 2017

Counting DNA Nucleotides
Solution for problem at ROSALIND.info

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment