Skip to content

Commit 41cc2b8

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 9c9bb29 commit 41cc2b8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

strings/capitalize.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def capitalize(sentence: str) -> str:
2121
# Find the first alphabetic character and capitalize it
2222
for idx, char in enumerate(sentence):
2323
if char.isalpha():
24-
return sentence[:idx] + char.upper() + sentence[idx+1:]
24+
return sentence[:idx] + char.upper() + sentence[idx + 1 :]
2525

2626
# If no alphabetic character exists, return the original string
2727
return sentence

0 commit comments

Comments
 (0)