Don't use .append(), we already know the final length. Instead, have python initialise the list of a certain size and set the elements in it. Makes the function like 4% faster.
11 KiB
11 KiB