Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

delete n from textpython

# Remove all line breaks from a long string of text

mystr = 'hello world, how do i enter line breaks?'
>>> mystr.replace(' ', '')
'helloworld,howdoienterlinebreaks?'

# You can also replace more then one thing for example:
mystring = mystring.replace('
', ' ').replace('
', '')
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #delete #textpython
ADD COMMENT
Topic
Name
7+4 =