Skip to content

Commit f8b1cc4

Browse files
authored
Use itertools.islice
Need more debug
1 parent ad8df9b commit f8b1cc4

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

programmers/Lv.1/num_n_string.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@ def solution(s):
1616
que = deque(s)
1717
while que:
1818
if ord(que[0]) >= 97:
19-
print(que[0:3])
20-
cha = count_dic[que[0:3]]
19+
cha = count_dic[collections.deque(itertools.islice(que, 0, 3))]
2120
for i in range(cha[0]):
2221
que.popleft()
2322
answer += cha[1]

0 commit comments

Comments
 (0)