Learn how to remove line Breaks from text with Python in this tutorial. ... replace( old, new [, count]). Return a copy of the string with all occurrences of substring old replaced by new. If the optional argument count is ... Line Breaks ยท Text to Html.