Skip to content

Commit f543b11

Browse files
committed
Complete 0006
1 parent 2218028 commit f543b11

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

DIYgod/0006/important_word.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,12 @@ def get_important_word(files):
3030
if __name__ == '__main__':
3131
files = get_files('.')
3232
print files
33-
print get_important_word(files)
33+
wordsort = get_important_word(files)
34+
maxnum = 1
35+
for i in range(len(wordsort) - 1):
36+
if wordsort[i][1] == wordsort[i + 1][1]:
37+
maxnum += 1
38+
else:
39+
break
40+
for i in range(maxnum):
41+
print wordsort[i]

DIYgod/0006/test/test.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
important important important important important important important important important important important important important important important important important important important
2-
1+
important important important important important important important important important important important important important important important important important important important
2+
test test test test test test test test test test test test test test test test test test test test test

0 commit comments

Comments
 (0)