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

CEO

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

CEO

검색하기 폼
  • 분류 전체보기 (439)
    • 🕵️‍♂️ 우물 밖의 개구리 (21)
      • Docker (4)
      • k8s (3)
      • git (1)
      • svn (1)
      • Selenium (5)
      • Synology (5)
      • 우분투 (2)
    • 🏋️‍♀️ 기반 다지기 (33)
      • 운영체제 (17)
      • 자료구조와 알고리즘 (8)
      • 네트워크 (8)
    • 👨‍💻 코딩테스트 (310)
      • Codility (28)
      • 백준 (224)
      • 프로그래머스 (44)
      • SWEA (14)
    • 🙋‍♂️ 프로그래밍 언어 (24)
      • C (14)
      • C++ (4)
      • Python (6)
    • 📃 회고록 (6)
    • ☀️ 일상 (24)
    • 🌏 Samsung (7)
    • 🎉웨딩 (2)
    • 🚗자동차일기 (12)
  • 방명록

Python itertools (1)
Python: itertools 활용하기

permutations from itertools import permutations nums = [num + 1 for num in range(3)] for cases in permutations(nums, 2): print(cases, end=' ') permutations(iterater, reapeat)를 통해 순열을 구할 수 있다. 결과 : (1, 2) (1, 3) (2, 1) (2, 3) (3, 1) (3, 2), 가능한 모든 순서로 반복을 하지 않음 combinations from itertools import combinations nums = [num + 1 for num in range(3)] for cases in combinations(nums, 2): print(cases, end..

🙋‍♂️ 프로그래밍 언어/Python 2020. 6. 6. 13:02
이전 1 다음
이전 다음
글 보관함
최근에 올라온 글
최근에 달린 댓글

ⓒ dirmathfl.tistory.com

티스토리툴바