파이썬 array_unshift()

Jmnote (토론 | 기여)님의 2018년 7월 28일 (토) 05:31 판 (새 문서: {{DISPLAYTITLE:파이썬 array_unshift()}} ==개요== ; Python array_unshift() ; 파이썬 array_unshift() <source lang='Python'> fruits = ["Banana", "Orange"]; fruits.insert(0, "App...)
(차이) ← 이전 판 | 최신판 (차이) | 다음 판 → (차이)

1 개요

Python array_unshift()
파이썬 array_unshift()
fruits = ["Banana", "Orange"];
fruits.insert(0, "Apple")
print( fruits )
# ['Apple', 'Banana', 'Orange']
fruits = ["Banana", "Orange"];
fruits[:0] = ["Apple"]
print( fruits )
# ['Apple', 'Banana', 'Orange']

2 같이 보기

3 참고

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}