Python Forum
common form of multi-line text - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: General (https://python-forum.io/forum-1.html)
+--- Forum: News and Discussions (https://python-forum.io/forum-31.html)
+--- Thread: common form of multi-line text (/thread-22773.html)



common form of multi-line text - Skaperen - Nov-26-2019

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?


RE: common form of multi-line text - ichabod801 - Nov-26-2019

That depends on the rest of the program.


RE: common form of multi-line text - Skaperen - Nov-28-2019

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,


RE: common form of multi-line text - ichabod801 - Nov-29-2019

(Nov-28-2019, 03:34 PM)Skaperen Wrote: the text given to it

I think that's your answer right there.