Re: How to replace space in a string with \n

^Bart gabriele1NOSPAM at hotmail.com
Thu Jan 31 06:35:47 EST 2019


[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]



More information about the Python-list mailing list