def removeElement(self, nums, val):
    '\n        :type nums: List[int]\n        :type val: int\n        :rtype: int\n        '
    j = 0
    for i in range(len(nums)):
        if (nums[i] != val):
            nums[j] = nums[i]
            j += 1
    return j
:type nums: List[int]
:type val: int
:rtype: int
def removeElement(self, nums, val):
    '\n        :type nums: List[int]\n        :type val: int\n        :rtype: int\n        '
    j = 0
    for i in range(len(nums)):
        if (nums[i] != val):
            nums[j] = nums[i]
            j += 1
    return j