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 |
Tags
- Amazon
- MongoDB
- SCALA APP
- nosql
- git
- AWSKRUG
- debug toolbar
- devops
- list
- Transit Gateway
- tgw
- Python
- VPC
- AI
- json
- ai assistant
- debug_toolbar
- ubuntu
- django
- AWS
- mcponaws
- Spark
- django-debug-toolbar
- pyspark
- amazon q
- Eclipse
- 툴바안뜸
- coding with ai
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 |