Copying a list of lists into part of another one in the most pythonic way <p>I have a large list of lists, for now containing only zeros. I have another, smaller list of lists which I want to copy to certain positions in the bigger list of lists. I want to replace the original values. The only way I've found so far is this:</p> <pre><code>start = (startrow, startcol) for i in range( start[0], start[0] + len(shortlist) ): for j in range( start[1], start[1] + len(shortlist[0]) ): longlist[i][j] = shortlist[i-start[0]][j-start[1]] </code></pre> <p>However, this doesn't feel very pythonic - as far as I know, list comprehensions are in general prefered to loops, and even though I didn't find it in few hours of searching, there might be some function doing this more elegantly. So is there some better solution than mine?</p> <p>EDIT: I'm interested in NumPy solutions as well, or perhaps even more than in plain Python ones.</p>