From 89f7dabb8cf21688a7b564edb73f62d2a37454b3 Mon Sep 17 00:00:00 2001 From: Colin Date: Sun, 27 Jul 2025 22:36:58 -0400 Subject: [PATCH] Update e05b3_different_vowels.py Optimisation refractoring, added .lower for potentiel capital letters --- ch02-strings/e05b3_different_vowels.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ch02-strings/e05b3_different_vowels.py b/ch02-strings/e05b3_different_vowels.py index 0e8080a..00a8756 100755 --- a/ch02-strings/e05b3_different_vowels.py +++ b/ch02-strings/e05b3_different_vowels.py @@ -7,7 +7,7 @@ def pig_latin_multivowels(word): first letter to the end is whether the word contains two or more different vowels. """ - number_of_vowels = len(set(word) & set('aeiou')) + number_of_vowels = len(set(word.lower) & set('aeiou')) # Adding .lower() makes the code more robust by including potential capital letters. if number_of_vowels > 1: return f'{word}way'