Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                
Skip to content

Commit a329bbb

Browse files
committed
0011
1 parent 9895a8b commit a329bbb

2 files changed

Lines changed: 38 additions & 0 deletions

File tree

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
北京
2+
程序员
3+
公务员
4+
领导
5+
牛比
6+
牛逼
7+
你娘
8+
你妈
9+
love
10+
sex
11+
jiangge

ailurus1991/0011/main.py

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#!/usr/bin/env python
2+
# -*- coding: utf-8 -*-
3+
4+
__author__ = 'jinyang'
5+
6+
7+
def readFile(filePath):
8+
file = open(filePath, 'r')
9+
words = []
10+
for word in file.readlines():
11+
# print word.strip('\n')
12+
words.append(word.strip('\n'))
13+
14+
return words
15+
16+
def check(testWord):
17+
realWords = readFile('filtered_words.txt')
18+
for i in realWords:
19+
if i == testWord:
20+
print 'Freedom'
21+
return
22+
else:
23+
print 'Human Rights'
24+
return
25+
26+
if __name__ == '__main__':
27+
check('sss')

0 commit comments

Comments
 (0)