compare types?

Terry Reedy tjreedy at
Wed Jan 1 18:54:28 CET 2003

> does anyone know if it is possible to use isinstance() to recognise
a list?

>>> isinstance([],list)

For questions like this, fire up the interactive interpreter (or keep
one on your task bar) and try it out.  Quicker than posting.  The
possibility of doing this so easily is one of Python's great features!

Terry J. Reedy

More information about the Python-list mailing list