Try list comprehension and string.strip()
:
>>> mystr = "L1
L2
L3
L4
L5"
>>> mystr.split('
')
['L1', 'L2', '', 'L3', 'L4', ' ', '', 'L5']
>>> [line for line in mystr.split('
') if line.strip() != '']
['L1', 'L2', 'L3', 'L4', 'L5']
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…