카테고리 없음
[python] 프로그래머스 - 외계어 사전 // 순열, set
mingyung
2025. 2. 21. 17:32
https://school.programmers.co.kr/tryouts/85920/challenges?language=python3
이 문제는 python 의 순열과 set을 복습하는데에 사용하면 좋을 문제다.
from itertools import permutations
def solution(spell, dic):
answer = 0
permutation = set(map(''.join,permutations(spell,len(spell))))
if permutation&set(dic):
return 1
else: return 2
파이썬 순열, 조합, 중복순열, 중복조합 복습하기
https://he-kate1130.tistory.com/70
[python] "코테"를 위한 기초 파이썬 (5) - 순열, 조합, 중복 순열, 중복 조합
파이썬에서는 iterpools라이브러리에서 순열과 조합, 중복 순열과 중복 조합에 대한 메서드를 제공하고 있다.라이브러리의 코드가 직접 구현실행하는 것 보다 몇배는 빠르기 때문에 숙지하고, 탐
he-kate1130.tistory.com
파이썬 Set 연산 복습하기
https://he-kate1130.tistory.com/120
[python] "코테"를 위한 기초 파이썬 (6) - set 연산
오늘은 코테에서 유용하게 사용할 수 있는 set에 대해서 알아보자Setset은 이름처럼 집합에 관련한 작업을 쉽게 처리할 수 있는 자료형이다.두가지의 큰 특징을 가진다.중복을 허용하지 않는다.
he-kate1130.tistory.com