"Python 튜플"의 두 판 사이의 차이

(새 문서: ==개요== ;Python 튜플, Python 투플 ;파이썬 tuple * 대략 값을 변경할 수 없는 리스트 * 원본의 변경 없는 연산은 가능 ==같이 보기== * 튜플 * [...)
 
잔글 (봇: 자동으로 텍스트 교체 (-<source +<syntaxhighlight , -</source> +</syntaxhighlight>))
 
(다른 사용자 한 명의 중간 판 5개는 보이지 않습니다)
2번째 줄: 2번째 줄:
;Python 튜플, Python 투플
;Python 튜플, Python 투플
;파이썬 tuple
;파이썬 tuple
* 순서가 있고 '''변경 불가능'''한 콜렉션
* 대략 값을 변경할 수 없는 리스트
* 대략 값을 변경할 수 없는 리스트
* 원본의 변경 없는 연산은 가능
* 원본의 변경 없는 연산은 가능
* 소괄호에 원소를 담아서 생성
<syntaxhighlight lang='python' run>
t = ("apple", "banana", "cherry")
print(t)    # ('apple', 'banana', 'cherry')
print(t[1]) # banana
</syntaxhighlight>


==같이 보기==
==같이 보기==
* [[튜플]]
* [[튜플]]
* [[파이썬 리스트]]
* [[Python 리스트]]
* [[Python 지명튜플]]
* [[Python 튜플인지 확인]]


==참고==
==참고==
* https://www.w3schools.com/python/python_tuples.asp
* https://www.tutorialspoint.com/python/python_tuples.htm
* https://www.programiz.com/python-programming/tuple
* https://docs.python.org/3/c-api/tuple.html
* http://openbookproject.net/thinkcs/python/english3e/tuples.html
* https://www.geeksforgeeks.org/tuples-in-python/


[[분류: Python 튜플]]
[[분류: Python 튜플]]

2021년 5월 6일 (목) 21:30 기준 최신판

1 개요[ | ]

Python 튜플, Python 투플
파이썬 tuple
  • 순서가 있고 변경 불가능한 콜렉션
  • 대략 값을 변경할 수 없는 리스트
  • 원본의 변경 없는 연산은 가능
  • 소괄호에 원소를 담아서 생성
t = ("apple", "banana", "cherry")
print(t)    # ('apple', 'banana', 'cherry')
print(t[1]) # banana

2 같이 보기[ | ]

3 참고[ | ]

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