length power wrote:
> x='name,sex,birthday\n\nx1,male,1948年05月28日\n\nx2,female,1952年03月27日
> \n\nx3,female,1994年12月09日'
> x.replace("\n\n","\n").splitlines()
>> is there more simple way to replace `x.replace("\n\n","\n").splitlines()`
> ?
One alternative that ignores all empty lines is
[line for line in x.splitlines() if line]