python 函数和方法

列表list的元素添加:

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

 

列表list的元素删除:

方法:remove(),pop()

函数:del

 

列表list的元素排序

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

函数:sorted  创建新列表

posted @ 2018-11-21 17:12  zhuzhuqwa  阅读(220)  评论(0编辑  收藏  举报