is_iterable

iteration_utilities.is_iterable(value, /)

Returns True if value is iterable, otherwise False.

Parameters
valueany type

The value to test if iterable.

Returns
is_iterablebool

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