fork(1) download
  1. i=input()
  2. o=[]
  3. if i.find('AUG')>=0:i=map(''.join,zip(*[iter(i[i.find('AUG'):])]*3))
  4. else:print "";exit()
  5. for j in i:
  6. if j not in['UGA','UAA','UAG']:o+=[j]
  7. else:break
  8. print ','.join(o)
Success #stdin #stdout 0.02s 9024KB
stdin
"AUGCUUAUGAAUGGCAUGUACUAAUAGACUCACUUAAGCGGUGAUGAA"
stdout
AUG,CUU,AUG,AAU,GGC,AUG,UAC