본문 바로가기 메뉴 바로가기

개발 정리 모음집

프로필사진
  • 글쓰기
  • 관리
  • 태그
  • 방명록
  • RSS

개발 정리 모음집

검색하기 폼
  • 분류 전체보기 (56)
    • spring (4)
    • springboot (8)
    • cs (2)
    • java (18)
    • 오곡(Ogok) (2)
    • 버드북(birdbook-backend) (1)
    • 소소한 정리 (5)
    • infra & cloud (1)
    • 알고리즘 (8)
    • python (1)
    • 티미 (4)
    • 우테코 프리코스 (0)
    • c++ (2)
  • 방명록

python (1)
dictionary

📕 dictionary(딕셔너리) Key와 Value를 한 쌍으로 가지는 자료형 dictionary = {"bannana": 1, "melon": 3} 해시 함수가 구현되어있는 형태이기도 하다. defaultdict defaultdict은 collections 라이브러리의 모듈이다. dictionary는 존재하지 않는 키를 참조하려고 할 때 검사를 해주어야하는데, 이러한 번거로움을 해결 해주는 것이 defaultdict이다. 타입을 입력받으면 입력받은 타입의 기본값을 존재하지 않는 키의 기본값으로 사용한다. from collections import defaultdict default_dict = defaultdict(dict) default_dict["apple"] = 1 default_dict["gr..

python 2023. 7. 9. 13:57
이전 1 다음
이전 다음
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
  • 깃허브
TAG
  • StreamAPI
  • 생성자
  • 이진탐색
  • id생성전략
  • checkedException
  • upperBound
  • 유효성 검사
  • 일급컬렉션
  • 자바
  • lowerBound
  • 오블완
  • @ConfigurationProperties
  • uncheckedException
  • null
  • 동등성
  • Spring
  • @Spring
  • 메인메소드
  • @NoArgsConstructor
  • Java
  • 티스토리챌린지
  • NPE
  • @Value
  • Optional
  • ddl-auto
  • Thymeleaf
  • JPA
  • 백준
  • springboot
  • N+1문제
more
«   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
글 보관함

Blog is powered by Tistory / Designed by Tistory

티스토리툴바