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 4ec71a3 commit 0812762Copy full SHA for 0812762
1 file changed
strings/capitalize.py
@@ -16,9 +16,8 @@ def capitalize(sentence: str) -> str:
16
if not sentence:
17
return ""
18
19
- # Capitalize the first character if it's a lowercase letter
20
- # Concatenate the capitalized character with the rest of the string
21
- return sentence[0].upper() + sentence[1:]
+ # will see more
+ return sentence[0].upper() + sentence[1:] if sentence[0].isalpha() else sentence
22
23
24
if __name__ == "__main__":
0 commit comments