j=len(nums)
for i in range(j-1,-1,-1):
if nums[i]==val:
nums.pop(i)
returnlen(nums)
本文标题:移除元素
本文链接:https://www.haomeiwen.com/subject/juanbqtx.html
网友评论