Python 리스트 pop()

개요[ | ]

파이썬 pop()
  • pop() 메소드로 구현
fruits = ["apple", "banana", "cherry"]
element = fruits.pop()
print( element ) # cherry
print( fruits )  # ['apple', 'banana']
문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}