checking if an element is a list or an atom

Is the only way to test if an object is a list, and not an atom, with the type() function?

J.

you can also use the types module like this:


from types import ListType
if type(object) == ListType:
        print "this is a list"

I hope that’s clear.

Martin