티스토리 뷰

Python(파이썬)/Python Q&A

List 사용법

브라이언77 2020. 3. 7. 15:01
반응형

List 사용법

Python Collections (Arrays)

There are four collection data types in the Python programming language:

  • List is a collection which is ordered and changeable. Allows duplicate members.
  • Tuple is a collection which is ordered and unchangeable. Allows duplicate members.
  • Set is a collection which is unordered and unindexed. No duplicate members.
  • Dictionary is a collection which is unordered, changeable and indexed. No duplicate members.

List 사용예 > 

 

- thislist = ["apple", "banana", "cherry"]

- thislist.append("orange")

- thislist.remove("banana")

- len(thislist)

- if "apple" in thislist:

- for x in thislist:

 

다음과 같은 List 함수를 사용할수 있다.

 

 

자료출처 : 

https://www.w3schools.com/python/python_lists.asp

 

Python Lists

Python Lists Python Collections (Arrays) There are four collection data types in the Python programming language: List is a collection which is ordered and changeable. Allows duplicate members. Tuple is a collection which is ordered and unchangeable. Allow

www.w3schools.com

 

끝. 

 

댓글
반응형
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
«   2024/09   »
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30
글 보관함