We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9c9bb29 commit 41cc2b8Copy full SHA for 41cc2b8
strings/capitalize.py
@@ -21,7 +21,7 @@ def capitalize(sentence: str) -> str:
21
# Find the first alphabetic character and capitalize it
22
for idx, char in enumerate(sentence):
23
if char.isalpha():
24
- return sentence[:idx] + char.upper() + sentence[idx+1:]
+ return sentence[:idx] + char.upper() + sentence[idx + 1 :]
25
26
# If no alphabetic character exists, return the original string
27
return sentence
0 commit comments