首页 > 编程语言 > 详细

python基础教程总结15——1.即时标记

时间:2015-07-25 16:31:03      阅读:280      评论:0      收藏:0      [点我收藏+]

1. 测试文档:

# test_input.txt
Welcome to World Wide Spam. Inc.

These are the corporate web pages of
*World Wide Spam*, Inc. We hope you find your stay enjoyable, and that you will sample many of our products. A short history of the company World Wide Spam was started in the summer of 2000. The business concept was to ride the dot-com wave and to make money both through bulk email and by selling canned meat online. After receiving several complaints from customers who werent satisfied by their bulk email, World Wide Spam altered their profile, and focused 100% on canned goods. Today, they rank as the worlds 13,892 online supplier of SPAM. Destinations From this page you may visit several of our interesting web pages: - What is SPAM?(http://wwspam.fu/whatisspam) - How do they make it?(http://wwspam.fu/howtomakeit) - Why should I eat it?(http://wwspam.fu/whyeatit) How to get in touch with us You can get in touch with us in *many* ways: By phone (555-1234), by email (wwspam@wwspam.fu) or by visiting our customer feedback page (http://wwspam.fu/feedback)

 

2.实现

2.1 找出文本块

  找出块:收集遇到的所有行,直到遇到一个空行,返回已经收集的行;不需要收集空行,也不要返回

 

 

3

python基础教程总结15——1.即时标记

原文:http://www.cnblogs.com/zxqstrong/p/4676001.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!