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
끝.