Represent sparse matrix in Python without library usage
Lots of ways to do it.  For example you could keep a list where each list element is either one of your data objects, or an integer representing N blank items.
I want to represent sparse matrix in Python in a data structure that does not waste space but in the same time preserves constant access time. Is there any easy/trivial way of doing it? I know that libraries such as scipy have it.