시퀀스란?

학습 페이지

시퀀스가 애초에 뭘까?

<aside> 💡

Sequences are an object type in Python that allows the user to store data one after each other. Operations can be performed on a sequence, to examined and manipulated the stored items. There are several different types of sequence objects in Python. 출처 : Sequences | Strings

</aside>

시퀀스는 파이썬에서 데이터를 순서대로 저장할 수 있는 데이터 타입이다. 시퀀스 타입에 적용되는 기능들은 모두 데이터의 순서대로 적용된다.

즉… 리스트 등을 포괄하는, 인덱싱이 가능한 자료구조를 파이썬에서 시퀀스라고 하는 듯 함.

파이썬에서 시퀀스는 크게 컨테이너와 플랫, 두 개로 구별한다.

컨테이너

플랫

컨테이너와 플랫은 다시 가변, 불변이라는 기준으로 새로 구분할 수도 있다.