class Solution:
def removeElement(self, nums, val):
"""
:type nums: List[int]
:type val: int
:rtype: int
"""
count = nums.count(val)
for j in range(0,count):
nums.remove(val)
return len(nums)
27.移除元素(通过)Python
猜你喜欢
转载自blog.csdn.net/Mryang2333/article/details/85238756
今日推荐
周排行