is_iterable

iteration_utilities.is_iterable(value, /)

Returns True if value is iterable, otherwise False.

Parameters:

value : any type

The value to test if iterable.

Returns:

is_iterable : bool

True if value is iterable otherwise it returns False.

Examples

A few simple examples:

>>> from iteration_utilities import is_iterable
>>> is_iterable(0)
False
>>> is_iterable('abc')
True
>>> is_iterable([1,2,3])
True