On Thu, 31 Jan 2019 10:18:20 +0100, ^Bart wrote:

> Hello everybody! :)
> 
> I got a text and I should replace every space with \n without to use
> str.replace,

Why?

> I thought something like this:
> 
> text = "The best day of my life!"
> 
> space = (' ')
> 
> if text.count(' ') in text:
>      space=\n
> 
> rightText = text-space
> 
>      print(rightText)
> 
> I should have an output like this:
> The best day of my life!





-- 
There is nothing new except what has been forgotten.
                -- Marie Antoinette
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to