Skip to content

Commit 0def4e1

Browse files
committed
1 parent 0753719 commit 0def4e1

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

Hongjoo/lv2/모음사전.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
from itertools import product
2+
def solution(word):
3+
answer = []
4+
li = ['A', 'E', 'I', 'O', 'U']
5+
for i in range(1,6):
6+
for per in product(li,repeat = i):
7+
answer.append(''.join(per))
8+
answer.sort()
9+
return answer.index(word)+1

0 commit comments

Comments
 (0)