sidpy.base.num_utils.to_ranges

sidpy.base.num_utils.to_ranges(iterable)[source]

Converts a sequence of iterables to range tuples

From https://stackoverflow.com/questions/4628333/converting-a-list-of-integers-into-range-in-python

Credits: @juanchopanza and @luca

Parameters:

iterable (collections.Iterable object) – iterable object like a list

Returns:

iterable – Cast to list or similar to use

Return type:

generator object