Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions hooting/0011/0011.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# -*- coding: utf-8 -*-
__author__ = 'hooting'
with open('filtered_words.txt','r')as f:
filter = [line.rstrip() for line in f]

while True:
text = raw_input("please input:")
for x in filter:
if x in text:
print "Freedom"
break
else:
print "Human Rights"
11 changes: 11 additions & 0 deletions hooting/0011/filtered_words.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
北京
程序员
公务员
领导
牛比
牛逼
你娘
你妈
love
sex
jiangge
12 changes: 12 additions & 0 deletions hooting/0012/0012.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# -*- coding: utf-8 -*-
__author__ = 'hooting'
with open('filtered_words.txt','r')as f:
filter = [line.rstrip() for line in f]

while True:
text = raw_input("please input:")
for x in filter:
if x in text:
print len(x)
text = text.replace(x, '*'*len(x))
print text
11 changes: 11 additions & 0 deletions hooting/0012/filtered_words.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
北京
程序员
公务员
领导
牛比
牛逼
你娘
你妈
love
sex
jiangge