'''
class Solution(object):
def removeElement(self, nums, val):
"""
:type nums: List[int]
:type val: int
:rtype: int
"""
i = 0
if nums == []:
return 0
while True:
try:
while nums[i] == val:
del nums[i]
i += 1
except:
break
return i + 1
'''