Remove All Spaces
Remove All Spaces
EasyStrings63% accepted
Given a string that may contain spaces, print the string with all spaces removed. For example, 'hello world fly' becomes 'helloworldfly'. This teaches character-level filtering — a technique used in parsing, tokenization, and data cleaning.
Approach
Given a string S, print S with all space characters removed.
Input
hello world
Output
helloworld
More Strings problems
Browse all coding problems →solution.py
Loading editor...
Test 1
Test 2
Test 3
Press Run to test your custom input, or Submit to judge against all test cases.
Sign in to continue
Create a free account to run code, submit solutions and track progress.
- Free forever — no credit card
- 10+ languages with live execution
- Points, streaks & leaderboards