📜  python代码示例中列表中的n-largest和n-smallest

📅  最后修改于: 2022-03-11 14:47:17.834000             🧑  作者: Mango

代码示例2
thislist = [677,8765,8765,876,470,754,6784,56789,7658,]
thislist.sort()
print ("The smallest number is: " + str(thislist[0]))
print ("The largest number is: " + str(thislist[-1]))