GC content

Biopython

# get the fraction of → GC content of a DNA sequence in percent

from Bio.SeqUtils import GC

GC('TGCAA')

40.0 # Sequence includes 40% of the bases G or C


http://biopython.org/DIST/docs/api/Bio.SeqUtils-pysrc.html#GC

# without using Biopython

http://saml.rilspace.org/calculating-gc-content-in-python