移除元素 2019-04-02 本文已影响0人 XIN71 j=len(nums) for i in range(j-1,-1,-1): if nums[i]==val: nums.pop(i) returnlen(nums)