Skip to content

Instantly share code, notes, and snippets.

@pvanheus
Created March 8, 2019 07:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pvanheus/6a33037817e20908ce4d6828de86f79c to your computer and use it in GitHub Desktop.
Save pvanheus/6a33037817e20908ce4d6828de86f79c to your computer and use it in GitHub Desktop.
dna = 'ctgtaacttagttggctctttcgtagcccattgtcgggctagctatttcactcccgcgggggtctccgcgtggatggt'
codon1 = dna[0:3]
codon2 = dna[3:6]
codon3 = dna[6:9]
codon4 = dna[12:15]
codon5 = dna[15:18]
print(codon1)
print(codon2)
print(codon3)
print(codon4)
print(codon5)
# put this in the next cell and complete
codon_list = []
for i in range(0,___,3):
codon = dna[i:i+3]
codon_list.______(codon)
for codon in codon_list:
print(codon)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment