Skip to content

PadRight

Pads a list on the right to a specified length.

$ wo 'PadRight[{1, 2, 3}, 5]'
{1, 2, 3, 0, 0}
$ wo 'PadRight[{a, b}, 4, x]'
{a, b, x, x}
$ wo 'PadRight[{1, 2, 3, 4, 5}, 3]'
{1, 2, 3}