class Solution:

    def removeElement(self, nums: List[int], val: int) ->int:
        for i in nums[:]:
            if i == val:
                nums.remove(i)
        return len(nums)


class Solution:

    def removeElement(self, nums: List[int], val: int) ->int:
        j = len(nums)
        for i in range(j - 1, -1, -1):
            if nums[i] == val:
                nums.pop(i)
        return len(nums)

1536902a53f864cd1568d8bafbaa47858f152aa0
<mask token>


class Solution:
    <mask token>

<mask token>


class Solution:

    def removeElement(self, nums: List[int], val: int) ->int:
        j = len(nums)
        for i in range(j - 1, -1, -1):
            if nums[i] == val:
                nums.pop(i)
        return len(nums)

class Solution:
    <mask token>


class Solution:

    def removeElement(self, nums: List[int], val: int) ->int:
        j = len(nums)
        for i in range(j - 1, -1, -1):
            if nums[i] == val:
                nums.pop(i)
        return len(nums)

class Solution:

    def removeElement(self, nums: List[int], val: int) ->int:
        for i in nums[:]:
            if i == val:
                nums.remove(i)
        return len(nums)


class Solution:

    def removeElement(self, nums: List[int], val: int) ->int:
        j = len(nums)
        for i in range(j - 1, -1, -1):
            if nums[i] == val:
                nums.pop(i)
        return len(nums)
