为了账号安全,请及时绑定邮箱和手机立即绑定

用python查找连续行

用python查找连续行

慕运维8079593 2019-02-23 19:05:36
我有一个文档,内容类似于 the line 1 is: a-b-o the line 2 is: not found the line 3 is: not found the line 4 is: a-c-k the line 5 is: a-d-g a-h-o the line 6 is: a-g-i the line 7 is: not found 这种。我想用python得到连续的有内容的那几行,而不是not found的那几行。以上面的为例,我想得到的结果是: the line 4 is: a-c-k the line 5 is: a-d-g a-h-o the line 6 is: a-g-i 请问大家可以怎么实现,谢谢。
查看完整描述

1 回答

  • 1 回答
  • 0 关注
  • 570 浏览
慕课专栏
更多

添加回答

举报

0/150
提交
取消
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号