These are the three scenarios I could think of to explain this:
Here the text and the triple quotes are aligned to the left
Check ouput, here the text is stored and print without a spaces at the begining of each paragraph.
let textSample1 = """
Test 1: Hello how are you welcome to the test
something else is written here
that's enough said
"""
print(textSample1)
Here the text has spacing at the begining but the triple quotes are aligned to the left
Check ouput, here the text is stored and print with spaces at the begining of each paragraph because the tripe quotes places at the left and they are taking into consideration those spaces in the paragraphs.
let textSample2 = """
Test 2: Hello how are you welcome to the test
something else is written here
that's enough said
"""
print(textSample2)
Here the text has spacing at the begining and the triple quotes also are spaced to match the text
Check ouput, here the text is stored and print without spaces at the begining though we have put spaces at the beginging, this is because the triple quotes are places at the same level as the text instead of the spaces so they spaces are ignored. I found this one handy when you want to store multi line text in code but wanted to wanted to maintain some code formatting among other uses to this.
let textSample3 = """
Test 3: Hello how are you welcome to the test
something else is written here
that's enough said
"""
print(textSample3)
OUTPUTS:
Test 1: Hello how are you welcome to the test
something else is written here
that's enough said
Test 2: Hello how are you welcome to the test
something else is written here
that's enough said
Test 3: Hello how are you welcome to the test
something else is written here
that's enough said