list comprehension question

John Posner jjposner at snet.net
Fri May 1 13:00:23 EDT 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