0

s_n = ("Bob: Hello Sandy: How are you? Bob: Confused by a python problem"

print(s_n)

i want to make this string in multiple lines without using "\n".

Output to be : Bob:

           Hello Sandy:

            How are you? ...etc 
Sirkey
  • 1

1 Answers1

0
s_n = ("""Bob: Hello

Sandy: How are you? Bob: Confused by a python problem""""

print(s_n)

Output: Bob: Hello Sandy: How are you? Bob: confused by a python problem

  • It doesn't solve the problem,because i need it to be print out in new lines one under another like in output i described,like in loop. – Sirkey Jul 21 '22 at 07:41
  • well you can add the linebreak by pressing enter and set your string in """[STRING]""" <- those will be translated in your print operation. Otherwise you have to use the \n linebreak operator. – Kerim Yagmurcu Jul 21 '22 at 09:12