#User inputs the code then a function decides whether the input is a valid genetic code" DNA_Code=input( 'Please enter your gentic code of interest:' ) nucleotides=('A','T','G','C', 'U') def dna_slice (): if DNA_Code.isalpha: UpperCaseCode=DNA_Code.upper() list(UpperCaseCode) if all(nucleotides): print('great') else: list(UpperCaseCode) and not all(nucleotides) print('no') dna_slice()
I get the great statement whether I input ATTGC or ATTGO, it doesn't seem to check all of the characters in the input string.
Thanks for the help guys.
This post has been edited by modi123_1: 30 April 2013 - 08:10 AM
Reason for edit:: fixed botched code tag