[프로그래머스] 같은 숫자는 싫어Lv.1
def solution(arr): a = [] temp = 10 for i in range(len(arr)): if temp != arr[i]: a.append(arr[i]) temp = arr[i] return a