def solution(arr):
answer = []
for a in arr:
if not answer:
answer.append(a)
else:
if answer[-1] != a:
answer.append(a)
# [실행] 버튼을 누르면 출력 값을 볼 수 있습니다.
# print('Hello Python')
return answer
def no_continuous(s):
result = []
for c in s:
if (len(result) == 0) or (result[-1] != c):
result.append(c)
return result