if you want to do this in place without copying the whole list, then something like
all(map(lambda x: x.pop(which_column), triangle))
EDIT. yes, it won't work if there's 0 in the column, just use any other accumulator function
sum(map(lambda x: x.pop(which_column), triangle))
for python 2 where map
is not an iterator accumulator is not needed:
map(lambda x: x.pop(1), triangle)
as a side effect, this returns the deleted column which you may use
deleted_column = list(map(lambda x: x.pop(which_column), triangle))
(for python 2 list() wrapper is not needed)
A shorter form would be
sum(i.pop(which_column) for i in triangle)
or
deleted_column = [i.pop(which_column) for i in triangle]
Although I'm not sure if it qualifies as 'without for loop'
P.S. In official Python documentation they use 0-lenqth deque to consume iterators, like this:
collections.deque(map(lambda x: x.pop(which_column), triangle), maxlen=0)
I don't know if it's better than sum(), but it can be used for non-numeric data