array_split.split.pad_with_none¶
- array_split.split.pad_with_none(sequence, new_length)[source]¶
Returns
sequencelistend-padded withNoneelements so that the length of the returned list equalsnew_length.- Parameters:
sequence (iterable) – Return listified sequence which has been end-padded.
new_length (
int) – The length of the returned list.
- Return type:
- Returns:
A
listof lengthnew_length.- Raises:
ValueError – if
len(sequence) > new_length).