From 081276241901318dd2e3c980bac27a3911cf3fc9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?BHUMIKA=20KADU=E2=9C=A8?= Date: Fri, 19 Sep 2025 01:48:15 +0530 Subject: [PATCH] Initial Commit --- strings/capitalize.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/strings/capitalize.py b/strings/capitalize.py index 628ebffc8852..89dc693cf9e6 100644 --- a/strings/capitalize.py +++ b/strings/capitalize.py @@ -16,9 +16,8 @@ def capitalize(sentence: str) -> str: if not sentence: return "" - # Capitalize the first character if it's a lowercase letter - # Concatenate the capitalized character with the rest of the string - return sentence[0].upper() + sentence[1:] + # will see more + return sentence[0].upper() + sentence[1:] if sentence[0].isalpha() else sentence if __name__ == "__main__":