We use Python 3.6

go back Level: Beginner (img: BG / score: 2) level Bite 54. Nicer formatting of a poem or text

43 out of 49 users completed this Bite ...
Will you be Pythonista #44 to crack this Bite?
Average Bite difficulty 1-10 rating: 5.0
» Up for a challenge? 💪

In this Bite you complete print_hanging_indents to print a poem (or text) in a nicer way.

For example calling it on (part of) Christina Rosetti's Remember it should convert:

                      Remember me when I am gone away,
                      Gone far away into the silent land;
                      When you can no more hold me by the hand,

                      Nor I half turn to go yet turning stay.

                      Remember me when no more day by day
                      You tell me of our future that you planned:
                      Only remember me; you understand
to:
Remember me when I am gone away,
    Gone far away into the silent land;
    When you can no more hold me by the hand,
Nor I half turn to go yet turning stay.
Remember me when no more day by day
    You tell me of our future that you planned:
    Only remember me; you understand

That's it! The tests include another text snippet from Shakespeare. Have fun!

Github login button