On 2019-01-31, ^Bart <gabriele1nos...@hotmail.com> wrote: > Hello everybody! :) > > I got a text and I should replace every space with \n without to use > str.replace, 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)
Your code resembles Python code, but it isn't close enough for me to offer reasonable help. You should figure out how to solve your problem *before* you start to write code. A paper and pencil will be required! -- Neil Cerutti -- https://mail.python.org/mailman/listinfo/python-list