Answers for "replace all spaces in string python with one space"

2

replacing spaces in a string python

mystring.replace(" ", "_")
Posted by: Guest on April-29-2020
0

python replace two spaces with one

" ".join(filter(bool, mystring.split(" ")))
Posted by: Guest on July-05-2021

Code answers related to "replace all spaces in string python with one space"

Python Answers by Framework

Browse Popular Code Answers by Language