def slices(string, size):
    if size <= 0 or size > len(string):
        raise ValueError('Invalid slice size')

    slices = []
    for indx, elem in enumerate(string):
        if len(string) - indx >= size:
            curr_slice = []
            curr_indx = indx
            while len(curr_slice) < size:
                curr_slice.append(int(string[curr_indx]))
                curr_indx += 1
            slices.append(curr_slice)
    return slices

@@ -12,20 +12,22 @@
 string, 
-size
+length
 ):%0A    i
@@ -28,20 +28,22 @@
 %0A    if 
-size
+length
  %3C= 0 or
@@ -43,20 +43,22 @@
 %3C= 0 or 
-size
+length
  %3E len(s
@@ -105,20 +105,22 @@
 d slice 
-size
+length
 ')%0A%0A    
@@ -145,16 +145,17 @@
 r indx, 
+_
 elem in 
@@ -206,20 +206,22 @@
 indx %3E= 
-size
+length
 :%0A      
@@ -311,12 +311,14 @@
 ) %3C 
-size
+length
 :%0A  

Rename size -> length