def translateDNAtoProtein (dna): # calculate reverseComplement # protein = getValidRegionAndEncodeIt(dna) # proteinR = getValidRegionAndEncodeIt(dnaRC) # return longest: # first solution, works great for basic specification: # if len(protein) > len(proteinR): # return protein # else: # return proteinR # second solution, works for any list of strings: # return max(allProteinsList, key=len)