"파이썬 unshift()"의 두 판 사이의 차이

 
23번째 줄: 23번째 줄:
* http://www.php2python.com/wiki/function.array-unshift/
* http://www.php2python.com/wiki/function.array-unshift/


[[분류: Python]]
[[분류: Python 리스트]]

2018년 7월 28일 (토) 13:42 기준 최신판

1 개요[ | ]

Python unshift()
파이썬 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 }}