I am trying to modify a nested list_x based on matching elements found in a second nested list_y and replace the element with the item from list_2:
list_x = [[\'Lig