I should take maximum and minimum of each sublist. I tried to create a new list with maximum and minimum values but it gives me an error.