Updated the element in a list with the given list.