1. Home
  2. Computing & Technology
  3. Python

Building a Whitelist for a Spam Filter

From , former About.com Guide

5 of 6

Sort and Print

Having the unsorted list of email addresses, we are now left to sorting them and printing them.

     for address in sorted(addresses):
          print address
Obviously, with a little extra coding, you can write the output to a file.

We are still not done, however. Next, we need to call the main() function and pass the location of the email to it.

Explore Python
About.com Special Features

The Best Web Trends of the Decade

A look back at the best innovations, ideas and technologies over the last 10 years, More >

Family Tech Center

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

  1. Home
  2. Computing & Technology
  3. Python

©2009 About.com, a part of The New York Times Company.

All rights reserved.