对不起,我有一个非常基本的python问题.在下面的程序中,我试图复制一个列表,然后按升序对其进行排序.我写的代码是:
def lesser_than(thelist): duplicate = thelist[:] duplicate = duplicate.sort() return duplicate
它给我的错误是它无法排序类型为None的东西.有谁知道为什么会这样?
python sorting list duplicates
duplicates ×1
list ×1
python ×1
sorting ×1