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 9c16c98 commit 4a9fea4Copy full SHA for 4a9fea4
tests/test_capitalize.py
@@ -0,0 +1,6 @@
1
+from training.capitalize import capitalize
2
+
3
+assert capitalize("") == ""
4
+assert capitalize("hello") == "Hello"
5
6
+print("Все тесты пройдены!")
training/__init__.py
training/capitalize.py
+def capitalize(text):
+ if text == "":
+ return ""
+ first_char = text[0].upper()
+ rest_substring = text[1:]
+ return f"{first_char}{rest_substring}"
0 commit comments