class Solution:
def removeElement(self, nums, val):
while val in nums:
nums.remove(val)
return len(nums)
过分简单,不做讲解(滑稽。。。。)
(成绩蛮不错的)
关注我,在Leetcode专栏中查看更多题目的解题思路吧!
class Solution:
def removeElement(self, nums, val):
while val in nums:
nums.remove(val)
return len(nums)
过分简单,不做讲解(滑稽。。。。)
(成绩蛮不错的)
关注我,在Leetcode专栏中查看更多题目的解题思路吧!