a=[5,2,[1,3]]
print(a.sort())
输出:
TypeError: '<' not supported between instances of 'list' and 'int'
要么全是数值,要么全是字符串,总之所有元素之间要支持<操作。
a=[5,2,[1,3]]
print(a.sort())
输出:
TypeError: '<' not supported between instances of 'list' and 'int'
要么全是数值,要么全是字符串,总之所有元素之间要支持<操作。