challenge2
recognize the characters. maybe they are in the book,
but MAYBE they are in the page source.
识别字符。也许他们是在书中,但也许他们是在页面的源代码。
用ie查看源文件:里面有答案<!--find rare characters in the mess below:-->
1、可以将源文件中的the mess below 混乱的字符都拷贝出来,放入记事本中,改名为:1.test
import re
f = file('1.test','r')
s = f.open()
c = re.compile(r'[a-z]')
d = c.findalls(s)
print d
f.close()
complie():匹配模式
findall():找到 RE 匹配的所有子串,并把它们作为一个列表返回
打印出来:['e', 'q', 'u', 'a', 'l', 'i', 't', 'y']
Python挑战游戏:识别罕见字符
在Python Challenge游戏中,第二关要求识别字符。提示可能在书籍中,也可能是页面源代码。通过查看页面源代码发现隐藏答案。使用正则表达式在混乱字符中查找并打印所有小写字母,结果为:'e', 'q', 'u', 'a', 'l', 'i', 't', 'y'。"
114342164,10536812,jieba分词在Java中的应用,"['jieba', 'java', 'NLP', '分词']
946

被折叠的 条评论
为什么被折叠?



