How To Implement Sparse Matrix In Python