In article <7589e0a1-98b2-4df4-bc76-5d4c10194...@f20g2000prn.googlegroups.com>, Falcolas <garri...@gmail.com> wrote: > >I'd also recommend trying the following filter, since it is identical >to what you're trying to do, and will probably catch some additional >edge cases without any additional effort from you. > >[s.strip() for s in hosts if s.strip()]
This breaks if s might be None -- Aahz (a...@pythoncraft.com) <*> http://www.pythoncraft.com/ [on old computer technologies and programmers] "Fancy tail fins on a brand new '59 Cadillac didn't mean throwing out a whole generation of mechanics who started with model As." --Andrew Dalke -- http://mail.python.org/mailman/listinfo/python-list