+2

How do I make the output of the code below to be left indented?

print("******World's Shortest Story****") def myfx(Guy,Lady): print(Guy, "Smiled\n", Lady, "Blushed\nEveryone Else Burned") myfx(input("Enter your name and that of your spouse to get your love story\nGuy:"),input("Lady:")) output: Guy Smiled, Lady Blushed, Everyone Else Burned

11/14/2019 2:38:11 PM

Muruthi B.M

3 Answers

New Answer

+5

I hope my example meets your expectations: https://code.sololearn.com/cKqvlAiCmQbH/?ref=app

+2

You can do in several ways: Just use spaces, come on: print('Hello\n world!') > Hello > world! Also you can use \t : print('Hello\n\tworld!') > Hello > world!

0

Asman-H method seem to work for me best. I also added new line character before first line for output. print("******World's Shortest Story****") def myfx(Guy,Lady): print('\n', Guy, 'Smiled\n', Lady, "Blushed\n Everyone Else Burned") myfx(input("Enter your name and that of your spouse to get your love story\nGuy:"),input("Lady:") Output: Guy Smiled, Lady Blushed, Everyone Else Burned