본문 바로가기

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
  • join
  • level4
  • import re
  • lv4
  • Stack
  • counter
  • 파이썬
  • Level2
  • coding test
  • 코딩테스트
  • Growth hacking
  • 코테
  • coding
  • hackerrank
  • programmers
  • Queue
  • python
  • 조합
  • LeetCode
  • AARRR
  • sql
  • mysql
  • 완전탐색
  • 코딩
  • cte
  • lambda
  • 프로그래머스
  • time complexity
  • itertools
  • tableau
more
Archives
Today
Total
관리 메뉴
  • 글쓰기
  • 방명록
  • RSS
  • 관리

목록extendleft (1)

ror_coding

[Python] Stack, Queue (collections) (deque)

from collections import dequeStack (스택)Queue (큐) from collections import dequeq = deque([1,2,3], maxlen = 5) # 크기 고정.# 추가.q.append(4) # [1,2,3,4]q.appendleft(0) # [0,1,2,3,4]# 제거 ( = 쓰면 제거된 값을 반환)q.pop() # [0,1,2,3]q.popleft() # [1,2,3]# 확장q.extend([4,5]) # [1,2,3] => [1,2,3,4,5]q.extendleft([4,5]) # [1,2,3] => [5,4,1,2,3]# 회전q.rotate(1) # [1,2,3] => [3,1,2]

Coding Test/Python 2024. 12. 2. 16:04
이전 Prev 1 Next 다음

Blog is powered by kakao / Designed by Tistory

티스토리툴바