python 函数和方法

列表list的元素添加:

方法:append(),extend(),insert()

列表list的元素删除:

方法:remove(),pop()

函数:del

列表list的元素排序

方法:sort(),reverse(),sort(reverse=True) 会更新原列表

函数:sorted  创建新列表

原文地址:https://www.cnblogs.com/zhuzhuqwa/p/9996284.html