Keep the Middle

Sometimes a string has wrapper characters on both ends, and you only need the middle part. Write remove_char, which takes a string s and returns it without the first and last characters. The string is guaranteed to contain at least two characters.

Примеры

Ввод
"eloquent"
Вывод
"loquen"
Ввод
"country"
Вывод
"ountr"
Ввод
"person"
Вывод
"erso"

Нужно реализовать

def remove_char(s: str) -> str:

Теги

strings
PostgreSQLv16

Tutaj pojawi się wynik wykonania kodu

Visible tests
1
Input
"eloquent"
Expected"loquen"
2
Input
"country"
Expected"ountr"
3
Input
"person"
Expected"erso"
4
Input
"place"
Expected"lac"
5
Input
"ok"
Expected""
6
Input
" "
Expected""
Focus radio
Paused · SomaFM · Fluid