1
嗯,我在python上找到了一些东西。为什么元素在使用sort()时会消失?
这是我所做的编码。
>>>list = [ x for x in input("input your elements composed with only numbers:").split()]
>>>list = list.sort() # in this point, all of values is disappeared..
你能告诉我,为什么?
权。它的做法相当于对列表进行排序,然后将其替换为无。 – Neil
谢谢你的帮助:D –