【Python】Python3 List remove()方法
来源:互联网 发布:win10安装tensorflow 编辑:程序博客网 时间:2024/06/07 06:46
描述 remove()
函数用于移除列表中某个值的第一个匹配项。
语法 remove()
方法语法:
list.remove(obj)
参数
- obj–列表中要移除的对象。
返回值
该方法没有返回值但是会移除两种中的某个值的第一个匹配项。
实例
以下实例展示了remove()
函数的使用方法:
list1 = ['Google', 'Runoob', 'Taobao', 'Baidu']list1.remove("Google")print("现在的列表为:",list1)list1.remove("Baidu")print("现在的列表为:",list1)
以上实例输出结果如下:
现在的列表为: ['Runoob', 'Taobao', 'Baidu']现在的列表为: ['Runoob', 'Taobao']
阅读全文
0 0
- 【Python】Python3 List remove()方法
- Python List remove()方法
- 【Python】Python3 List max()方法
- 【Python】Python3 List min()方法
- 【Python】Python3 List append()方法
- 【Python】Python3 List count()方法
- 【Python】Python3 List index()方法
- 【Python】Python3 List insert()方法
- 【Python】Python3 List pop()方法
- 【Python】Python3 List reverse()方法
- 【Python】Python3 List sort()方法
- 【Python】Python3 List clear()方法
- 【Python】Python3 List copy()方法
- Python list del remove
- list remove 方法
- list remove 方法
- list remove 方法
- List remove()方法介绍
- Flutter实战一Flutter聊天应用(二十)
- 获取模块路径
- jquery可见性过滤选择器:hidden、:visible
- LintCode 合并两个排序链表
- Android Service,AlarmManager组合实现定时任务踩的坑
- 【Python】Python3 List remove()方法
- winform多线程
- windows平台使用eclipse搭建android开发环境
- JavaWeb——文件上传和下载
- IAR 编译不过performing Post-Build Action的问题
- 并发编程1:全面认识 Thread
- Python Numpy的数组array和矩阵matrix
- Tp自定义分页
- 升级 python 2.6.6 系统到 2.7.10 版本