You can try this:
def canReleaseHounds(sentence):
vowels = ["A", "E", "I", "O", "U", "a", "e", "i", "o", "u"]
new_sentence = sentence.split()
return any([True if i[0] in vowels or i[1] in vowels else False for i in new_sentence]
if canReleaseHounds(sentence):
print("He can be fired")
else:
print("He cannot be fired")
The python any() function checks if only one element is a "Truthy" statement, which means it is true, in a python sense. In this case, the for loop loops through the words in the sentence, and if the first or second word is a vowel, it will store True in the list. If both the first and the second letters in the word are not found in the vowel list, then the list stores False. When the list is passed to the any() function, it will look for any instance of True. If no True is found in the list, then it will return False. However, if True is in the list, it will return True. In your example, True will be stored if there is only one occurence of a vowel in the first two letters. That lone true will be enough to return True, meaning that Lenny can be fired, because he needs to speak only one vowel first to get himself in "trouble". I hope this helps!
More on the Python any and all functions:
How do Python's any and all functions work?