list comprehension question

John Posner jjposner at snet.net
Fri May 1 19:00:23 CEST 2009


Shane Geiger wrote:
>    if type(el) == list or type(el) is tuple:
A tiny improvement:

        if type(el) in (list, tuple):




More information about the Python-list mailing list