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
- AWS
- react
- cookie
- class
- Queue
- mongoose
- Bull
- Dinosaur
- 공룡게임
- nestjs
- typeORM
- Python
- 자료구조
- dfs
- JavaScript
- game
- Nest.js
- MySQL
- flask
- Sequelize
- TypeScript
- jest
- 정렬
- OCR
- GIT
- nodejs
- 게임
- MongoDB
- Express
Archives
- Today
- Total
목록remove() (1)
포시코딩
1월6일
Python list의 값 없애기 remove() list의 특정 값을 없애는 함수 test = [4, 2, 5, 1, 3] test.remove(2) print(test) # [4, 5, 1, 3] pop() list의 특정 인덱스의 값을 없애는 함수 test = [4, 2, 5, 1, 3] test.pop(2) print(test) # [4, 2, 1, 3] del pop()과 같이 특정 인덱스의 값을 없애는 역할이지만 쓰는 방식이 살짝 다르다. test = [4, 2, 5, 1, 3] del test[2] print(test) # [4, 2, 1, 3]
TIL
2023. 1. 7. 04:27