리스트 슬라이싱

Jmnote (토론 | 기여)님의 2023년 12월 24일 (일) 10:35 판 (→‎C++=)

1 개요

리스트 슬라이싱

2 C++

3 Python

numbers = [100,200,300,400,500,600,700]
print( numbers[0:3] ) # [100, 200, 300]
print( numbers[:5] )  # [100, 200, 300, 400, 500]
print( numbers[3:] )  # [400, 500, 600, 700]
문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}