# 解题思路: 无 20190302 找工作期间
class Solution(object):
def removeElement(self, nums, val):
"""
:type nums: List[int]
:type val: int
:rtype: int
"""
k = 0
for i in range(len(nums)):
if nums[i] != val:
nums[k] = nums[i]
k += 1
return k
nums = [0,1,2,2,3,0,4,2]
nums2 = [3,2,2,3]
s = Solution()
print s.removeElement(nums2,3)