Is the only way to test if an object is a list, and not an atom, with the type() function?
J.
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