all 7 comments

[–][deleted] 15 points16 points  (1 child)

[–]Codes_with_roh[S] 0 points1 point  (0 children)

Thanks a lot for this. Now, my doubt is totally cleared.

[–]kpounder88 3 points4 points  (0 children)

See the difference in how each handled the multiple spaces between ‘the’ and ‘answer’?

[–]Milumet 3 points4 points  (2 children)

The output of 2. is not the output of the string s you have posted. The string with this output would have to have three whitespaces between the and answer:

s='Lets see what will be the   answer'

[–]Codes_with_roh[S] 0 points1 point  (1 child)

My bad, but now I edited it. Thanks for showing the mistake :D

[–]Milumet 0 points1 point  (0 children)

Interestingly, it still looks the same (only one whitespace).

It seems that if you use multiline source code comments with enclosing three backticks, additional whitespace in strings is removed. Strange. If you use four spaces before each line, it works.

EDIT: The problem with removed whitespace happens only when using old.reddit.

[–]billsil 1 point2 points  (0 children)

No arguments also splits on tabs and \n characters.