Google Interview Question

There was a question regarding a python based matrix