📅  最后修改于: 2022-03-11 14:47:06.726000             🧑  作者: Mango
代码示例1
import heapq
def second_smallest(numbers):
return heapq.nsmallest(2, numbers)[-1]
second_smallest([1, 2, 3, 4])
# Output: 2