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 |
Tags
- game
- Bull
- Python
- nodejs
- mongoose
- TypeScript
- AWS
- nestjs
- jest
- 공룡게임
- 자료구조
- typeORM
- Queue
- dfs
- react
- MongoDB
- MySQL
- 게임
- Dinosaur
- cookie
- flask
- class
- OCR
- Nest.js
- 정렬
- Sequelize
- GIT
- JavaScript
- 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