If you're interested in generators (and you should be), here is the link that made me use generators and list comprehension:
http://www.dabeaz.com/generators/Generators.pdf
TrustyTony commented: Great reference on generators! +3
Gribouillis commented: good! post your mbox parsing code when it's finished! +4
Gribouillis commented: Nice. I didn't think it was possible with translate. +3
deonis commented: very nice post! Well explained ! +1
amadain commented: that is great. Thanks +1
d5e5 commented: Good start. It brought me closer to feeling I understood what the OP wants to do. +0
vegaseat commented: a good deduction +16
vegaseat commented: thanks, I didn't test my code +15
chico2009 commented: Thanks a very helpful comment +1
romes87 commented: Very helpful +1
nunos commented: Excellent post! Very simple and clarifying. +1