본문 바로가기
python-algorithm

leetcode 1491. Average Salary Excluding the Minimum and Maximum Salary

by 무적김두칠 2022. 3. 24.

1
2
3
4
5
6
import statistics
class Solution:
    def average(self, salary: List[int]) -> float:
        salary.sort()
        salary=salary[1:-1]
        return statistics.mean(salary)
cs
반응형

댓글