def expand_degeneracies(raw_primers):
 expanded_primers = []
 for raw_primer in raw_primers:
  primer_seq = DNASequence(raw_primer.strip())
  for expanded_primer in primer_seq.nondegenerates():
   expanded_primers.append(str(expanded_primer))
 return expanded_primers

def expand_degeneracies ( raw_primers ) : expanded_primers = [ ] for raw_primer in raw_primers : primer_seq = DNASequence ( raw_primer . strip ( ) ) for expanded_primer in primer_seq . nondegenerates ( ) : expanded_primers . append ( str ( expanded_primer ) ) return expanded_primers
returns all non-degenerate versions of a given primer sequence .