반응형
Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 | 31 |
Tags
- GIT
- Github
- PySpark
- array
- PostgreSQL
- Google Spreadsheet
- PANDAS
- hive
- google apps script
- Mac
- numpy
- Apache
- gas
- math
- dataframe
- Python
- string
- Excel
- Kotlin
- django
- c#
- Java
- list
- Redshift
- Tkinter
- matplotlib
- 파이썬
- Google Excel
- SQL
Archives
- Today
- Total
목록DEL (1)
달나라 노트
Python Basic : list clear, remove, pop, del (list속 요소 삭제하기)
Python list의 요소를 삭제할 수 있는 기능을 제공하는 method는 크게 4가지가 있습니다. 각 method의 특징은 다음과 같습니다. Method Description clear() list속 모든 요소를 삭제하여 비어있는 list로 변환시킴 (원본 list에서 삭제됨) remove(value) list속에서 value와 동일한 값을 삭제 (원본 list에서 삭제됨) pop(index) list속에서 명시된 index의 요소를 삭제 (원본 list에서 삭제됨) del list[index] list속에서 명시된 index의 요소를 삭제 (원본 list에서 삭제됨) 예시를 보면서 한번 알아봅시다. list_test = [5, 3, 1, 4, 2, 'a', 'bc', 'def'] list_test...
Python/Python Basic
2021. 3. 29. 03:35