Created
April 11, 2019 08:57
-
-
Save StephenFordham/e516060a8cbae786fb5e7364802c5bf3 to your computer and use it in GitHub Desktop.
Input Validation Improved
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import re | |
DNA = input('Please enter your DNA sequence...').upper() | |
while re.search('[^AGCT]', DNA): | |
DNA = input('Please enter a valid DNA sequence...').upper() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment