def gccontent(sequence): """Return the percent GC content of an unambiguous nucleotide SEQUENCE""" total = len(sequence) gccount = 0 for base in sequence: if 'G' == base or 'C' == base: gccount = gccount + 1 return 100.0 * gccount / total seq1 = "ATCGGACCTACGCCTCAAGCACCTACATCCCGATAGAAGACCCTTTT" seq2 = "ATCGGACCCCGTAGACAATTCAAGCACCTACATCCCGATAGAAGACCCTTTT" seq3 = "GACCATACTGCCTCCAAGCAGCCTAACAATCCCCGTATGAGGAAGAACCC" print seq1, gccontent(seq1) print seq2, gccontent(seq2) print seq3, gccontent(seq3)