Answers for "replace empty space with single space python"

1

python replace all new lines with space

# you probably want to use a space ' ' to replace `n`
mystring = mystring.replace('n', ' ').replace('r', '')
Posted by: Guest on December-10-2021
3

replace multiple spaces with single space python

' '.join(myString.split())
Posted by: Guest on July-11-2020

Code answers related to "replace empty space with single space python"

Python Answers by Framework

Browse Popular Code Answers by Language