Message from Python discussions

December 2018

— Yeah.

— 

By using the "split" function using the " " character. Something like s2 = s.split(" ")

*Note, that there is a space in quotation marks, not just an empty string.

— Then use ', '.join(text) to output the words in splitted

— Language:

py3


Source:
from decimal import Decimal
a = Decimal("2018.12")
b = Decimal("2018")
print(a-b)


Result:
0.12

Message permanent page

— .split(" ") and .split() are basically the same

— I second

— Why tho?

— To remove the square braces and make the output look more better

— Why?

— ... literally like this?

— That's how I prefer it man😂😂😂

— I am just showing flexibility around various "split" characters.