본문 바로가기

ror_coding

검색하기
ror_coding
프로필사진 ro_rdil_31

  • Home (160)
    • Data Analysis (13)
      • Growth Hacking (7)
      • Tableau (6)
    • Coding Test (140)
      • Python (86)
      • SQL (54)
    • Certificate (5)
      • 빅데이터 분석 기사 (0)
      • SQLD (3)
      • ADsP (2)
Guestbook
Notice
Recent Posts
Recent Comments
Link
  • RoR's Github
«   2025/08   »
일 월 화 수 목 금 토
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
Tags
  • 코딩테스트
  • 프로그래머스
  • Queue
  • import re
  • programmers
  • itertools
  • 조합
  • tableau
  • AARRR
  • hackerrank
  • 코딩
  • mysql
  • time complexity
  • LeetCode
  • Level2
  • coding test
  • 코테
  • join
  • Growth hacking
  • cte
  • python
  • Stack
  • sql
  • lv4
  • level4
  • 완전탐색
  • coding
  • counter
  • lambda
  • 파이썬
more
Archives
Today
Total
관리 메뉴
  • 글쓰기
  • 방명록
  • RSS
  • 관리

목록from functools (1)

ror_coding

[Python] reduce (functools)

from functools import reduce (누적 함수 적용)partial (함수의 일부 인수 고정해서 새로운 함수 생성)lru_cache (함수의 실행 결과 캐싱하여 동일한 입력에 대해 빠르게 반환) reducefrom functools import reducefrom math import gcd# 리스트의 모든 값 곱하기nums = [1, 2, 3, 4]= reduce(lambda x, y: x * y, nums) # 24= reduce(gcd, nums) # 모든 원소의 최대공약수 구함. partialfrom functools import partial# 기본 인자를 고정한 함수 생성def power(base, exp): return base ** expsquare = partial(..

Coding Test/Python 2025. 1. 16. 16:33
이전 Prev 1 Next 다음

Blog is powered by kakao / Designed by Tistory

티스토리툴바