Skip to content

Instantly share code, notes, and snippets.

@StephenFordham
Last active April 8, 2019 08:15
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 StephenFordham/1c9c85d9333deba3c2fdbeec7a8a629d to your computer and use it in GitHub Desktop.
Save StephenFordham/1c9c85d9333deba3c2fdbeec7a8a629d to your computer and use it in GitHub Desktop.
RegexExample4
DNA = 'ATCGACCGGGTTT'
if re.search('CCGGG', DNA) or re.search('CCCGG', DNA):
print('Restriction enzyme found!')
if re.search('CC(G|C)GG', DNA):
print('Restriction enzyme found!')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment