본문 바로가기
Leetcode

[LeetCode] Remove Element 파이썬 (list remove)

by YGSEO 2021. 3. 29.
728x90
class Solution:
    def removeElement(self, nums: List[int], val: int) -> int:
        while val in nums:
            nums.remove(val)

 

728x90

댓글