def myfunc(): """ >>> print(myfunc()) some text not blank """ l = ['some text', '', 'not blank'] return '\r\n'.join(l) def myfunc_n(): """ >>> print(myfunc_n()) some text not blank """ l = ['some text', '', 'not blank'] return '\n'.join(l)