remove nth node from end of list python