text = "The best day of my life!" output = '' for i in text: if i == ' ': output +='\n' else: output += i
print(output) throwing my hat in the ring, not only is it .replace free it is entirely method free On Thu, Jan 31, 2019 at 3:41 AM ^Bart <gabriele1nos...@hotmail.com> wrote: > [Solved by myself and I'm happy!!! :)] > > text = "The best day of my life!" > > space = text[3] > > print (text.replace(space, "\n")) > > [Like what I said in another message, in the afternoon I'll ask to the > teacher if for this exercise we're able to use .replace] > -- > https://mail.python.org/mailman/listinfo/python-list > -- https://mail.python.org/mailman/listinfo/python-list