My simple Python code


  • 0
    W
    class Solution(object):
        def removeElement(self, nums, val):
            while nums.count(val):
                nums.remove(val)
            return len(nums)

Log in to reply
 

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.