Ad
Code
Diff
  • 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/text
    • matches = re.findall(pattern, text)
    • # Return the number of vowels
    • return len(matches)
    • return len([i for i in text if i in "aeiouyAEIOUY"])
Code
Diff
  • multiply_and_add_one = lambda a, b: a*b+1
    
    • def multiply_and_add_one(a, b):
    • r = a * b
    • return r + 1
    • multiply_and_add_one = lambda a, b: a*b+1