+ 3
How to delete spacebars from string
input ('Hello world ') output ('Helloworld')
4 Respostas
+ 3
str = ''.join(input().split (' '))
https://code.sololearn.com/ckRVJ6B47m31/?ref=app
+ 5
C/C++ version:
void rm_space(char *s)
{
char *p;
for (p = s; *s; s++)
if (*s != ' ')
*p++ = *s;
*p = '\0';
}
+ 3
in Python 3
input = 'Hello world '
output = input.replace(" ", "")
print(output)
+ 2
Gen2oo Such a beautiful code! Love it