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
- Angular
- PreparedStatement
- STS
- Guava
- ssh
- 방화벽
- Mutable
- DOM
- datanodes
- Hive
- JPS
- Immutable
- Vue.js
- jre
- react
- dao
- Linux
- hadoop
- centos8
- DTO
- bom
- vm
- Statement
- jdk
- Vo
- Big Sur
- hive-site.xml
- DBeaver
- CentOS
- variable
Archives
- Today
- Total
목록Python (1)
개미 개발자
Python의 immutable 객체와 mutable 객체
궁금증 💡 [[0]*3]*3과 [[0]*3 for _ in range(3)]의 차이점이 무엇일까? 코드 둘 다 [[0,0,0],[0,0,0],[0,0,0]]을 만든다. 그렇다면 어떤 차이가 있을까? [0][0]의 숫자를 1로 바꿔보자 생각대로라면 [[1,0,0],[0,0,0],[0,0,0]]이 나와야 한다. 하지만 [[0]*3]*3 의 코드로 작성한 경우 [[1,0,0],[1,0,0],[1,0,0]] 이 된다. 이유를 알아보자 해결 python의 변수는 크게 immutable 객체와 mutable객체 두 가지로 나뉜다. mutable Lists Sets Dictionaries User-Defined Classes immutable Numbers(Integer, Rational, Float, Decimal..
개념 정리
2022. 1. 6. 00:08