코딩공부

  • 홈
  • 태그
  • 방명록

mutability 1

[python] mutability

1. immutable : unchanging over time or unable to be changed String are immutable: Strings are cannot change once created. Instead, an assignment statement must be used. x = 10 print(id(x)) #1384163392 def add5_to_x(a): print(id(a)) # 1384163392 a = a + 5 return a x = add5_to_x(x) print(id(x)) #1384163472 x = add5_to_x(x) -> reassign 한 것이기 때문에 memory주소가 달라짐. (값 자체가 달라졌기 때문에 다른 곳을 reference) pytho..

Self-study/Python 2024.01.15
이전
1
다음
더보기
프로필사진

코딩공부

  • 분류 전체보기 (41)
    • Self-study (38)
      • HTML (0)
      • CSS (0)
      • Javascript (12)
      • 자바 (5)
      • Python (11)
      • React (6)
      • C언어 (1)
      • Kotlin (2)
      • 기타 (1)
    • Leetcode (3)
      • alogorithm (0)

Tag

파이썬 기초, python, 코드잇, 지수표기법, 파이썬, 자바스크립트, 외장함수, coding, 함수, mutability, 리트코드, 객체지향, 자바의정석, 코딩, 초보개발, 변수, 자바스크립, 지역변수, leetcode, 자바,

최근글과 인기글

  • 최근글
  • 인기글

최근댓글

공지사항

페이스북 트위터 플러그인

  • Facebook
  • Twitter

Archives

Calendar

«   2025/10   »
일 월 화 수 목 금 토
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

방문자수Total

  • Today :
  • Yesterday :

Copyright © Kakao Corp. All rights reserved.

티스토리툴바