Skip to main content
2 of 2
deleted 26 characters in body
vapor
  • 7.9k
  • 2
  • 23
  • 56

A simpler version.

p[list_, n_] := 
 Module[{res = Partition[list, UpTo[Ceiling[Length[list]/n]]]}, 
  Join[res, Table[{}, n - Length[res]]]]
vapor
  • 7.9k
  • 2
  • 23
  • 56