pymel.util.arguments.sequenceToSlices

sequenceToSlices(intList, sort=True)

convert a sequence of integers into a tuple of slice objects