Skip to content

Commit de00985

Browse files
Count it!
1 parent fcf869b commit de00985

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

0x16-api_advanced/100-main.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/usr/bin/python3
2+
"""
3+
100-main
4+
"""
5+
import sys
6+
7+
if __name__ == '__main__':
8+
count_words = __import__('100-count').count_words
9+
if len(sys.argv) < 3:
10+
print("Usage: {} <subreddit> <list of keywords>".format(sys.argv[0]))
11+
print("Ex: {} programming 'python java javascript'".format(sys.argv[0]))
12+
else:
13+
result = count_words(sys.argv[1], [x for x in sys.argv[2].split()])

0 commit comments

Comments
 (0)