Skip to content

Commit 0812762

Browse files
committed
Initial Commit
1 parent 4ec71a3 commit 0812762

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

strings/capitalize.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,8 @@ def capitalize(sentence: str) -> str:
1616
if not sentence:
1717
return ""
1818

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:]
19+
# will see more
20+
return sentence[0].upper() + sentence[1:] if sentence[0].isalpha() else sentence
2221

2322

2423
if __name__ == "__main__":

0 commit comments

Comments
 (0)