1

So I was wondering if it was possible to have the program write each line of say, a story on a different line, without you having to type each of the sentences in a separate print function. It's silly but also a serious question.

martineau
  • 112,593
  • 23
  • 157
  • 280

1 Answers1

0

Try this:

s = 'this is. the text. that you. want to separate'.replace('.','\n')
print(s)
smci
  • 29,564
  • 18
  • 109
  • 144
j__carlson
  • 1,272
  • 3
  • 10
  • 18
  • @DYZ: ok I should have said [`str` is both the name of a builtin type, and conversion function](https://docs.python.org/3/library/stdtypes.html?highlight=str#str). Same point. – smci Jul 27 '21 at 00:44