Skip to content
智工坊博客
Main Navigation
Home
pyVideoTrans视频翻译
Appearance
Menu
Return to top
On this page
从列表中移除项
del
语句可用于删除列表中给定索引处的项。
python
>>>
l
=
[
"宝马"
,
"Z4"
,
"红色"
]
>>>
del
l[
1
]
>>>
l
[
'宝马'
,
'红色'
]