일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- dsf
- 백준온라인저지
- 그리디
- 백준 온라인 저지
- BOT
- docker container
- airflow architecture
- SQL
- docker image
- hackerrank
- 알고리즘
- 빅데이터를 지탱하는 기술
- telegram
- Airflow
- data_engineer
- MySQL
- docker
- 프로그래머스
- airflow webserver
- delete join
- 2023년 목표
- Pseudo Lab
- 데이터 엔지니어
- Data Engineering
- Python
- terraform
- Dynamic Programming
- Spark
- leetcode
- datacamp
- Today
- Total
목록Python (3)
Lim Seunghyun Space
개요 딕셔너리에 없는 키에 접근할 때 특정 기본값을 지정해주기 위해 사용 defaultdict는 collections안에 구현 생성 방법 from collections import defaultdict sample = defaultdict() # defaultdict에 default 값을 지정해주지 않으면 없는 key 접근시 KeyError가 발생한다. # print(sample["one"]) >> KeyError 발생 default = dict sample2 = defaultdict(default) # defaultdict(Default Value) # Default Value는 무조건 callable 해야한다. print(sample2["one"]) defaultdict(default)으로 생성하며 ..
문제 링크 https://leetcode.com/problems/climbing-stairs/ Climbing Stairs - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 문제 해설 계단의 정상에 도달하려면 n번의 걸음을 해야한다. 매번 1개 혹은 2개의 계단을 오를 수 있다. 얼마나 많은 방법으로 정상에 오를 수 있는가 나의 풀이 (Python3) class Solution: def climbStairs(self, n): if n
문제 : https://www.hackerrank.com/challenges/validate-a-roman-number/problem?isFullScreen=true Validating Roman Numerals | HackerRank Use regex to validate Roman numerals. www.hackerrank.com 문제 해설 정규표현식을 이용하여 주어진 로마숫자가 유효한지 판단하는 로직 문제 풀이 (Python3) regex_pattern = r"^M{0,3}(CM|CD|D?C{0,3})(XC|XL|L?X{0,3})(IX|IV|V?I{0,3})$"# Do not delete 'r'. import re print(str(bool(re.match(regex_pattern, input()..