1491. Average Salary Excluding the Minimum and Maximum Salary
https://leetcode.com/problems/average-salary-excluding-the-minimum-and-maximum-salary/
Python
class Solution:
def average(self, salary: List[int]) -> float:
salary.sort()
return sum(salary[1:-1]) / (len(salary)-2)