码迷,mamicode.com
首页 > 编程语言 > 详细

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

时间:2015-07-25 16:34:03      阅读:167      评论: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
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!