Waze interview question

I was asked to solve in python the leetcode question of Toeplitz matrix.