How to test if object is sequence, or iterable?

Tim N. van der Leeuw tim.leeuwvander at nl.unisys.com
Sat Jul 22 12:58:02 EDT 2006


Hi,

I'd like to know if there's a way to check if an object is a sequence,
or an iterable. Something like issequence() or isiterable().

Does something like that exist? (Something which, in case of iterable,
doesn't consume the first element of the iterable)

Regards,

--Tim




More information about the Python-list mailing list