lol = [[1, 3], [3, 4]]
from operator import setitem
map(lambda x: setitem(x, 1, -2), lol)
print(lol)
[[1, -2], [3, -2]]
How to perform a 'one-liner' assignment on all elements of a list of lists in python