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
- pyspark
- amazon q
- MongoDB
- VPC
- git
- django-debug-toolbar
- coding with ai
- Transit Gateway
- Amazon
- Spark
- json
- mcponaws
- debug_toolbar
- AI
- Eclipse
- devops
- ai assistant
- AWS
- django
- ubuntu
- tgw
- nosql
- list
- Python
- AWSKRUG
- SCALA APP
- 툴바안뜸
- debug toolbar
Archives
- Today
- Total
STACKBASE
[Python] 리스트 할당과 복사 본문
반응형
#리스트 복사 방식
a = [1,2,3,4,5]
b = a.copy()
print(id(a))
print(id(b))
#다차원 리스트 복사
x = [[1,2], [3,4,5]]
import copy
#deep copy
y = copy.deepcopy(x)
print(id(x))
print(id(y))반응형
'프로그래밍 > Python' 카테고리의 다른 글
| [Python] map, filter 함수 (0) | 2021.11.28 |
|---|---|
| [Python] lambda function (0) | 2021.11.28 |
| [Python] 위치/키워드 가변 매개변수 (0) | 2021.11.28 |
| [Python] raise 구문 (0) | 2021.11.21 |
| [Python] try, except 구문 (0) | 2021.11.21 |