Search snippets
Browse Code Answers
FAQ
Usage docs
Log In
Sign Up
Home
Python
replace multiple spaces with single space python
Shannak
Programming language:
Python
2021-07-29 16:10:47
0
Q:
replace multiple spaces with single space python
matty
Code:
Python
2021-02-19 18:25:27
' '.join(mystring.split())
2
sonrisa
Code:
Python
2021-07-06 17:13:48
import re re.sub(' +', ' ', 'The quick brown fox') 'The quick brown fox'
1
Tags
python
multiple
replace
Related
remove trailing and leading spaces in python
replacing spaces in a string python
python convert remove spaces from beginning of string
add whitespaces between char python
python replace space with underscore
removing spaces in a string python
python remove spaces
split string by spaces python
count number of spaces in string python
how to make only one space in python
how to remove spaces in string in python
remove spaces from string python
remove multiple space python
remove extra spaces python
trim multiple spaces in python
python 3 replace all whitespace characters
remove leading and lagging spaces dataframe python
New to Communities?
Join the community