def GC(seq):
 gc = sum((seq.count(x) for x in ['G', 'C', 'g', 'c', 'S', 's']))
 try:
  return ((gc * 100.0) / len(seq))
 except ZeroDivisionError:
  return 0.0

def GC ( seq ) : gc = sum ( ( seq . count ( x ) for x in [ 'G' , 'C' , 'g' , 'c' , 'S' , 's' ] ) ) try : return ( ( gc * 100.0 ) / len ( seq ) ) except ZeroDivisionError : return 0.0
calculates g+c content .