Answers for "python regex replace spaces for one"

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 "python regex replace spaces for one"

Python Answers by Framework

Browse Popular Code Answers by Language