Stringbuffer Equivalent In Python