Python Forum

Full Version: common form of multi-line text
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
for a function intended to take a multi-line block of text and produce a different multi-line block of text as the return value (not necessarily the same number of lines), should it expect a string with '\n' or '\r' or '\r\n' ending each line or should it expect a list or tuple of strings with no control ending?
That depends on the rest of the program.
it's for a function that could be used in many programs. for example i have a function called box() that forms an ASCII box around the text given to it. maybe i should make it return text in the same form given to it,
(Nov-28-2019, 03:34 PM)Skaperen Wrote: [ -> ]the text given to it

I think that's your answer right there.