[Programmers] 코딩 기초 트레이닝 #3
HTML 삽입 미리보기할 수 없는 소스 배열의 길이에 따라 다른 연산하기 https://school.programmers.co.kr/learn/courses/30/lessons/181854 def solution(arr, n): LENGTH = len(arr) update_index = [] if LENGTH % 2 != 0: for x in range(0, LENGTH): if x % 2 == 0: update_index.append(x) else: for x in range(0, LENGTH): if x % 2 != 0: update_index.append(x) for index in update_index: arr[index] = arr[index] + n return arr 더 크게 합치기 htt..