1. Home
  2. Computing & Technology
  3. Python

Building a Whitelist for a Spam Filter

From Al Lukaszewski, for About.com

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

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

Easy ways to connect two computers for networking purposes. More >

  1. Home
  2. Computing & Technology
  3. Python

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

All rights reserved.