Sha256: 7717e2789027f93f544c96d8fd3d6b71e1f1ef7425d2065163ef08688bee5d57
Contents?: true
Size: 286 Bytes
Versions: 227
Compression:
Stored size: 286 Bytes
Contents
def slices(series, length): numbers = [int(digit) for digit in series] if not 1 <= length <= len(numbers): raise ValueError("Invalid slice length for this series: " + str( length)) return [numbers[i:i + length] for i in range(len(numbers) - length + 1)]
Version data entries
227 entries across 227 versions & 1 rubygems