python中过滤掉空行

 

001、

[root@PC1 test]# ls
a.txt  test.py
[root@PC1 test]# cat a.txt
01 02 03 04
05 06 07 08

09 10 11 12


13 14 15 16
17 18 19 20
[root@PC1 test]# python test.py
01 02 03 04
05 06 07 08
09 10 11 12
13 14 15 16
17 18 19 20

 。

posted @ 2025-07-16 11:22  小鲨鱼2018  阅读(5)  评论(0)    收藏  举报