stephan_shar:

([[40, 3], [41, 3], [30, 3], [31, 3]],
[[30, 3], [40, 3], [50, 3], [43, 5]],
[[12, 3], [30, 3], [31, 3], [17, 3], [27, 3]],
[[60, 4], [70, 4]])


>>> n = np.max([len(item) for item in a])
>>> a_paded = [item + [[0,0]]*(n-len(item)) if len(item) < n else item for item in a]
>>> a_paded
[[[40, 3], [41, 3], [30, 3], [31, 3], [0, 0]], 
 [[30, 3], [40, 3], [50, 3], [43, 5], [0, 0]], 
 [[12, 3], [30, 3], [31, 3], [17, 3], [27, 3]], 
 [[60, 4], [70, 4], [0, 0], [0, 0], [0, 0]]]