Obtenez le second Min non de l'arrêt en python

import heapq
def second_smallest(numbers):
    return heapq.nsmallest(2, numbers)[-1]

second_smallest([1, 2, 3, 4])
# Output: 2
Disgusted Dotterel