Python Challenge 03 Solution

来源:互联网 发布:一句一句教唱歌软件 编辑:程序博客网 时间:2024/04/29 16:15

gist


#!/usr/bin/env python# -*- coding: UTF-8 -*- # http://www.pythonchallenge.com/pc/def/equality.html import re # the content of equality.txt is from the# source of equality.htmlwith open('equality.txt', 'r') as file1:    content = file1.read() # we just want the small letterprint ''.join(re.findall('[^A-Z]+[A-Z]{3}([a-z])[A-Z]{3}[^A-Z]+', content))


原创粉丝点击