-
[프로그래머스] 배열 두배 만들기 - python코딩테스트 2023. 12. 4. 00:21
https://school.programmers.co.kr/learn/courses/30/lessons/120809
프로그래머스
코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요.
programmers.co.kr


def solution(numbers): answer = [] for i in numbers: answer.append(i*2) return answerhttps://1ooflower.tistory.com/53
[PYTHON] del, append, sort, reverse, index, insert, remove, pop, count, extend 함수
del 함수 : 삭제 함수 del a[x]는 x번째 요솟값을 삭제한다. a = [1, 2, 3, 4, 5] del a[2] #a[2]삭제 print(a) b = [1, 2, 3, 4, 5] del b[1:3] #b[1],b[2] 삭제 print(b) [1, 2, 4, 5] [1, 4, 5] append 함수 : 추가 함수 append(x)는 리스
1ooflower.tistory.com
'코딩테스트' 카테고리의 다른 글
[프로그래머스] 짝수는 싫어요 - python (1) 2023.12.05 [프로그래머스] 중앙값 구하기 - python (0) 2023.12.05 [프로그래머스] 분수의 덧셈 - python (1) 2023.12.03 [프로그래머스] 몫 구하기 - python (0) 2023.12.01 [프로그래머스] 0 떼기 - python (0) 2023.11.30