catching empty strings (I guess that's what they are)

Alex Martelli aleax at
Tue Jul 10 06:59:03 CEST 2007

Diez B. Roggisch <deets at> wrote:
> for uf in user_files:
>     uf = uf.strip().lower()
>     if uf:
>        file_skip_list.append(uf)

This is fine; however, another reasonable alternative is:
    if not uf.isspace():

I prefer yours (it's simpler IMHO), but if I was doing a code review I
would accept either of these.


More information about the Python-list mailing list