When you use triple quotes like this, the resulting string will contain all of the characters between the triple quotes, including spaces and line breaks.
So, let's look at your code again. It looks like this:
''' Hello!
How are
you?'''
If we look closely at this code, we can see that it consists of:
- 4 spaces
- The triple quotation mark
'''
- 1 space
- The word
Hello!
- A line break
- 8 spaces
- The words
How are
- A line break
- 8 spaces
- The word
you?
- The triple quotation mark
'''
Therefore, the resulting string will contain all of the characters between the triple quotes, namely:
- 1 space
- The word
Hello!
- A line break
- 8 spaces
- The words
How are
- A line break
- 8 spaces
- The word
you?
And as you can see, that's exactly what got printed out.