Inner Text
Sometimes you need to remove wrapper characters from the edges of a string and keep only the inside text. Write a function without_end that takes a string s with length at least 2. Return a new string without the first and last characters.
Примеры
Ввод
"Hello"Вывод
"ell"Ввод
"java"Вывод
"av"Ввод
"coding"Вывод
"odin"Нужно реализовать
def without_end(s: str) -> str:
Теги
strings
Accedi per vedere la cronologia degli invii
AccediAccedi per usare l'AI Mentor
AccediVisible tests
1
Input
"Hello"Expected
"ell"2
Input
"java"Expected
"av"3
Input
"coding"Expected
"odin"4
Input
"ab"Expected
""5
Input
" "Expected
""6
Input
""Expected
""Focus radio
Paused · SomaFM · Fluid