Python Practice › String Programs › Program 70

Remove all spaces

EasyString Programs · 70 of 106

Write a Python program to remove all spaces from a string.

Advertisement
Input
"python at sqatools"
Output
pythonatsqatools

Approach

  1. replace(" ", "").

Solution

Python
print("python at sqatools".replace(" ", ""))
Output
pythonatsqatools
Advertisement

Learn the concept

New to this topic? Read the lesson, then come back.

More string programs

← All 106 String Programs