aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--challenge-282/steven-wilson/python/ch-2.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/challenge-282/steven-wilson/python/ch-2.py b/challenge-282/steven-wilson/python/ch-2.py
index 199cffc157..afc62d82a7 100644
--- a/challenge-282/steven-wilson/python/ch-2.py
+++ b/challenge-282/steven-wilson/python/ch-2.py
@@ -21,7 +21,7 @@ def changing_keys(string):
if not all(c.isalpha() for c in string):
raise ValueError('User should type an aphabetic string')
- return len([item for _, item in groupby(string.casefold())]) - 1
+ return sum(1 for _ in groupby(string.casefold())) - 1
if __name__ == "__main__":