We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 32e6b05 commit e807409Copy full SHA for e807409
Jimmy66/0011/0011.py
@@ -0,0 +1,24 @@
1
+#!/bin/env python
2
+# -*- coding: utf-8 -*-
3
+
4
+def read_file(filename):
5
+ l = []
6
+ with open(filename,'r') as fp:
7
+ for line in fp.readlines():
8
+ l.append(line.strip())
9
+ return l
10
11
+def input_check(l):
12
+ string = raw_input('Please enter word: ')
13
+ if string in l:
14
+ print 'Freedom'
15
+ else:
16
+ print 'Human Rights'
17
18
+def main():
19
+ filename = 'filtered_words.txt'
20
+ l = read_file(filename)
21
+ input_check(l)
22
23
+if __name__ == '__main__':
24
+ main()
Jimmy66/0011/filtered_words.txt
@@ -0,0 +1,11 @@
+北京
+程序员
+公务员
+领导
+牛比
+牛逼
+你娘
+你妈
+love
+sex
+jiangge
0 commit comments