Skip to content

Instantly share code, notes, and snippets.

@StephenFordham
Created April 11, 2019 08:54
Show Gist options
  • Save StephenFordham/8e8c5bfbb123c49513e2565a2112cc6d to your computer and use it in GitHub Desktop.
Save StephenFordham/8e8c5bfbb123c49513e2565a2112cc6d to your computer and use it in GitHub Desktop.
Input Validation
import re
DNA = input('Please enter your DNA sequence...').upper()
while re.search('[^AGCT]', DNA):
exit("DNA sequence entered is not valid")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment