isiterable#
- isiterable(obj, *args, exclude=None, minlen=None)[source]#
Determine whether or not the input is iterable, with optional types to exclude.
- Parameters:
Examples:
obj1 = [1,2,3] obj2 = 'abc' obj3 = set() sc.isiterable(obj1) # Returns True sc.isiterable(obj1, obj2, obj3, exclude=str, minlen=1) # returns [True, False, False]
See also
numpy.iterable()
for a simpler version.New in version 3.0.0: “exclude” and “minlen” args; support multiple arguments