Apple interview question

Implement a convolution algorithm in Python