From 0f3b37c5801a6345a731bf1aa65364ed2fe4840f Mon Sep 17 00:00:00 2001 From: Saurabh Mahapatra <98408932+its-100rabh@users.noreply.github.com> Date: Fri, 13 Oct 2023 18:30:22 +0530 Subject: [PATCH] Modified comments on lower.py --- strings/lower.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/strings/lower.py b/strings/lower.py index 9ae419123ceb..49256b0169ef 100644 --- a/strings/lower.py +++ b/strings/lower.py @@ -14,9 +14,9 @@ def lower(word: str) -> str: 'what' """ - # converting to ascii value int value and checking to see if char is a capital - # letter if it is a capital letter it is getting shift by 32 which makes it a lower - # case letter + # Converting to ASCII value, obtaining the integer representation + # and checking to see if the character is a capital letter. + # If it is a capital letter, it is shifted by 32, making it a lowercase letter. return "".join(chr(ord(char) + 32) if "A" <= char <= "Z" else char for char in word)