Skip to content

Commit fc8f688

Browse files
its-100rabhsedatguzelsemme
authored andcommitted
Modified comments on lower.py (TheAlgorithms#10369)
1 parent 9dd47ad commit fc8f688

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Diff for: strings/lower.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ def lower(word: str) -> str:
1414
'what'
1515
"""
1616

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
17+
# Converting to ASCII value, obtaining the integer representation
18+
# and checking to see if the character is a capital letter.
19+
# If it is a capital letter, it is shifted by 32, making it a lowercase letter.
2020
return "".join(chr(ord(char) + 32) if "A" <= char <= "Z" else char for char in word)
2121

2222

0 commit comments

Comments
 (0)