Space Cleaner

Sometimes text needs to be prepared for code, usernames, or compact storage by removing spaces while keeping everything else unchanged. Write a function no_space that takes a string x and returns it with all spaces removed. If the input string is empty, return an empty string.

Примеры

Ввод
"8 j 8 mBliB8g imjB8B8 jl B"
Вывод
"8j8mBliB8gimjB8B8jlB"
Ввод
"8 8 Bg"
Вывод
"88Bg"
Ввод
""
Вывод
""

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

def no_space(x: str) -> str:

Теги

strings
PostgreSQLv16

Siia ilmub koodi käivituse tulemus

Visible tests
1
Input
"8 j 8 mBliB8g imjB8B8 jl B"
Expected"8j8mBliB8gimjB8B8jlB"
2
Input
"8 8 Bg"
Expected"88Bg"
3
Input
""
Expected""
4
Input
"a b c"
Expected"abc"
5
Input
"no spaces here please"
Expected"nospaceshereplease"
6
Input
" "
Expected""
Focus radio
Paused · SomaFM · Fluid