>>> triples = [rna[i:i+3] for i in range(0, len(rna), 3)] >>> print triples ['UUU', 'UCU', 'UAU', 'UGU', 'UUC', 'UCC']