標籤:
1. 測試文檔:
# test_input.txtWelcome 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 companyWorld 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 weren‘t satisfied by their bulk email, World Wide Spam altered their profile, and focused 100% on canned goods. Today, they rank as the world‘s 13,892 online supplier of SPAM.DestinationsFrom 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 usYou can get in touch with us in *many* ways: By phone (555-1234), by email ([email protected]) or by visiting our customer feedback page (http://wwspam.fu/feedback)
2.實現
2.1 找出文字區塊
找出塊:收集遇到的所有行,直到遇到一個空行,返回已經收集的行;不需要收集空行,也不要返回
3
python基礎教程總結15——1.即時標記