We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c855062 commit 1117a50Copy full SHA for 1117a50
strings/lower.py
@@ -14,9 +14,9 @@ def lower(word: str) -> str:
14
'what'
15
"""
16
17
- # converting to ascii value int value and checking to see if char is a capital
18
- # letter if it is a capital letter it is getting shift by 32 which makes it a lower
19
- # 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.
20
return "".join(chr(ord(char) + 32) if "A" <= char <= "Z" else char for char in word)
21
22
0 commit comments