python 코딩테스트 준비

·2025년 6월 4일

1. from ~ import ~

from collections import deque
from itertools import permutations
from itertools import combinations
from itertools import permutations

data = ['A', 'B', 'C']
result = list(permutations(data, 2))
print(result)
# 출력: [('A', 'B'), ('A', 'C'), ('B', 'A'), ('B', 'C'), ('C', 'A'), ('C', 'B')]
profile
DevOps를 기반으로 한 클라우드, 알고리즘, 백엔드 관심있는 컴공생

0개의 댓글