[Sequencs Type]
2. Tuple (불변, 고정 값들의 리스트)
days = ["Mon", "Tue", "Wed", "Thu", "Fri"] = list type
days = ("Mon", "Tue", "Wed", "Thu", "Fri") = tuple type
- list 와의 차이점
list 의 50% 정도의 기능을 할 수 있다.
하지만 list type 처럼 값을 변경 할 수 없다.
https://docs.python.org/3/library/stdtypes.html#typesseq-common
'Python' 카테고리의 다른 글
Python [function] argugment use (0) | 2019.11.24 |
---|---|
Python function def , use (0) | 2019.11.24 |
Python Dictionary type (javascript obj 같은 것) (0) | 2019.11.24 |
Python list [Sequence type] (0) | 2019.11.23 |
Python 변수 타입 (0) | 2019.11.23 |