There may be several ways to do this. One way is using numpy.sum() and numpy.where(). Here is an example.
>>> X
<10x9 sparse matrix of type '<type 'numpy.int32'>'
with 18 stored elements in Compressed Sparse Row format>
>>> X.toarray()
array([[1, 0, 0, 0, 1, 0, 0, 0, 0],
[0, 0, 0, 1, 0, 0, 0, 0, 0],
[0, 1, 1, 1, 0, 0, 0, 0, 0],
[0, 1, 0, 0, 1, 0, 0, 0, 0],
[0, 0, 1, 0, 0, 0, 0, 0, 0],
[0, 0, 0, 1, 0, 0, 0, 0, 0],
[0, 1, 0, 0, 1, 0, 0, 0, 0],
[0, 0, 1, 1, 0, 0, 0, 0, 0],
[0, 1, 1, 1, 0, 0, 0, 0, 0],
[0, 0, 0, 0, 1, 0, 0, 0, 0]])
>>> i=np.where(X.sum(axis=0)!=0)[1]
>>> i
array([0, 1, 2, 3, 4], dtype=int64)
>>> X[:,i]
<10x5 sparse matrix of type '<type 'numpy.int32'>'
with 18 stored elements in Compressed Sparse Row format>
>>> X[:,i].toarray()
array([[1, 0, 0, 0, 1],
[0, 0, 0, 1, 0],
[0, 1, 1, 1, 0],
[0, 1, 0, 0, 1],
[0, 0, 1, 0, 0],
[0, 0, 0, 1, 0],
[0, 1, 0, 0, 1],
[0, 0, 1, 1, 0],
[0, 1, 1, 1, 0],
[0, 0, 0, 0, 1]])
>>>
Sum() function using axis=0 will generate the total for all columns using all rows. Then where() function checks which columns have total != 0.