def count(text: str) -> int: return len([i for i in text if i in "aeiouyAEIOUY"])
import re- def count(text: str) -> int:
pattern = r"[aeiouyAEIOUY]"# Find all vowel matches in the string/textmatches = re.findall(pattern, text)# Return the number of vowelsreturn len(matches)- return len([i for i in text if i in "aeiouyAEIOUY"])