锘??xml version="1.0" encoding="utf-8" standalone="yes"?>国产91久久精品一区二区,精品无码久久久久国产,亚洲伊人久久成综合人影院 http://m.shnenglu.com/xmli/category/10513.html銇烽洩椋樼粵姊呮槧孌嬬孩 <br> &nbsp;&nbsp; 銇瘋姳鑸為湝椋炴槧鑻嶆澗<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;----- Do more,suffer lesszh-cnMon, 11 May 2009 10:30:17 GMTMon, 11 May 2009 10:30:17 GMT60Python Challenge lv5: peak hellhttp://m.shnenglu.com/xmli/archive/2009/05/11/82588.html鏉庣幇姘?/dc:creator>鏉庣幇姘?/author>Mon, 11 May 2009 08:54:00 GMThttp://m.shnenglu.com/xmli/archive/2009/05/11/82588.htmlhttp://m.shnenglu.com/xmli/comments/82588.htmlhttp://m.shnenglu.com/xmli/archive/2009/05/11/82588.html#Feedback0http://m.shnenglu.com/xmli/comments/commentRss/82588.htmlhttp://m.shnenglu.com/xmli/services/trackbacks/82588.htmlhttp://www.pythonchallenge.com/pc/def/peak.html
 榪欐槸鍙嶅簭鍒楀寲鐨勪竴閬撻pickle錛岄〉闈㈡簮鐮佷腑鐨刡anner.p鐨勫瓧鏍鳳紝 涓哄簭鍒楀寲鏂囦歡鍦板潃銆備絾瑙f瀽鐨勭粨鏋滃茍涓嶆槸鏈緇堢殑絳旀錛岃姳浜嗗崐澶╂椂闂寸粓浜庡紕鏄庣櫧緇撴灉鏄竴涓敤‘#’瀛楃粍鎴愮殑鍥懼艦錛屽憸鍛鹼細(xì) 紼嬪簭杈撳嚭錛?br>
import pickle
import urllib.request

if __name__ == '__main__':
    url 
= 'http://www.pythonchallenge.com/pc/def/banner.p'
    request
= urllib.request.Request(url)
    
# my pc must use proxy to connect
    request.set_proxy('172.16.0.252:80''http')
    
    
try:        
        response
= urllib.request.urlopen(request)
        banner
= pickle.load(response)
        response.close()
        
        
for line in banner:
            
print(''.join(map(lambda x: x[0]* x[1], line)))
              
    
except Exception as ex:
        
print(ex)

紼嬪簭杈撳嚭錛?br>
                                                                                              
              #####                                                                      #####
               ####                                                                       ####
               ####                                                                       ####
               ####                                                                       ####
               ####                                                                       ####
               ####                                                                       ####
               ####                                                                       ####
               ####                                                                       ####
      ###      ####   ###         ###       #####   ###    #####   ###          ###       ####
   ###   ##    #### #######     ##  ###      #### #######   #### #######     ###  ###     ####
  ###     ###  #####    ####   ###   ####    #####    ####  #####    ####   ###     ###   ####
 ###           ####     ####   ###    ###    ####     ####  ####     ####  ###      ####  ####
 ###           ####     ####          ###    ####     ####  ####     ####  ###       ###  ####
####           ####     ####     ##   ###    ####     ####  ####     #### ####       ###  ####
####           ####     ####   ##########    ####     ####  ####     #### ##############  ####
####           ####     ####  ###    ####    ####     ####  ####     #### ####            ####
####           ####     #### ####     ###    ####     ####  ####     #### ####            ####
 ###           ####     #### ####     ###    ####     ####  ####     ####  ###            ####
  ###      ##  ####     ####  ###    ####    ####     ####  ####     ####   ###      ##   ####
   ###    ##   ####     ####   ###########   ####     ####  ####     ####    ###    ##    ####
      ###     ######    #####    ##    #### ######    ###########    #####      ###      ######
                                                                                              
寰楀埌涓嬩竴鍏沖湴鍧錛?channel

]]>
Python Challenge lv4: follow the chainhttp://m.shnenglu.com/xmli/archive/2009/05/11/82578.html鏉庣幇姘?/dc:creator>鏉庣幇姘?/author>Mon, 11 May 2009 08:05:00 GMThttp://m.shnenglu.com/xmli/archive/2009/05/11/82578.htmlhttp://m.shnenglu.com/xmli/comments/82578.htmlhttp://m.shnenglu.com/xmli/archive/2009/05/11/82578.html#Feedback0http://m.shnenglu.com/xmli/comments/commentRss/82578.htmlhttp://m.shnenglu.com/xmli/services/trackbacks/82578.htmlhttp://www.pythonchallenge.com/pc/def/linkedlist.php
   
  璇村疄璇濓紝濂戒笉瀹規(guī)槗閫氳繃google鎼炴竻妤氶鐩殑瑕佹眰錛?閫氳繃涓嶆柇鐨勪粠鏈嶅姟鍣ㄥ彇寰椾竴涓獁eb page錛岀劧鍚庝粠婧愮爜涓壘鍑轟笅涓涓摼鎺ョ殑鍦板潃銆傞渶瑕佹敞鎰忕殑鏄細(xì)铏界劧欏甸潰鐨勬簮鐮佸緢綆鍗曪紝浣嗗茍涓嶆槸鍏朵腑鎵鏈夌殑鏁板瓧閮芥槸鏈夋晥鐨勶紝闇瑕佷嬌鐢ㄦ鍒欒〃杈懼紡鎵懼嚭姝g‘鐨刾attern褰㈠紡鎵嶅彲浠ワ紝瀵規(guī)湰棰樿岃█r'nothing is (\d+)'鏄竴涓彲鐢ㄧ殑pattern錛屼嬌鐢?'.join([x for x in text if x.isdigit()] 灝嗘墍鏈夌殑鏁板瓧閮界矘榪炶搗鏉ヤ簡錛岀粨鏋滆窡韙埌4000澶氳繕娌$粨鏉燂紝鎵嶇煡閬撲笂褰撲簡銆傘傘?br> 
import re
import urllib.request


if __name__ == '__main__':
    url 
= 'http://www.pythonchallenge.com/pc/def/linkedlist.php?nothing='
    index 
= '17675'
    counter 
= 1
    pattern 
= re.compile(r'nothing is (\d+)')
    
while True:
        
try:
            request
= urllib.request.Request(url+index)
            
# my pc must use proxy to connect
            request.set_proxy('172.16.0.252:80''http')
            response
= urllib.request.urlopen(request) 
            content
=str(response.read().decode())
            response.close()    
            
print(counter, content)
            
            result 
= pattern.search(content)
            
if not result:
                
break
            
            index 
= result.group(1)
            counter 
+= 1        
        
except Exception as ex:
            
print(ex)
            
break
  紼嬪簭杈撳嚭錛?br>1 and the next nothing is 8511
2 and the next nothing is 89456
3 and the next nothing is 43502
4 and the next nothing is 45605
5 and the next nothing is 12970
6 and the next nothing is 91060
7 and the next nothing is 27719
8 and the next nothing is 65667
9 peak.html

寰楀埌涓嬩竴涓鐩殑鍦板潃peak.html (娉細(xì)鎴戠殑index鍒濆鍊兼槸17675錛岄鐩腑鏈鏃╃粰鍑虹殑鍙笉鏄繖涓鹼紝 鎴戞槸浠庡湴鍧鍒楄〃鐨勫悗涓閮ㄥ垎閫変簡涓涓暟瀛楄屽凡錛屽洜姝や笉瑕佹媴蹇?

]]>
Python Challenge lv3: rehttp://m.shnenglu.com/xmli/archive/2009/05/11/82577.html鏉庣幇姘?/dc:creator>鏉庣幇姘?/author>Mon, 11 May 2009 07:52:00 GMThttp://m.shnenglu.com/xmli/archive/2009/05/11/82577.htmlhttp://m.shnenglu.com/xmli/comments/82577.htmlhttp://m.shnenglu.com/xmli/archive/2009/05/11/82577.html#Feedback0http://m.shnenglu.com/xmli/comments/commentRss/82577.htmlhttp://m.shnenglu.com/xmli/services/trackbacks/82577.htmlhttp://www.pythonchallenge.com/pc/def/equality.html

  One small letter, surrounded by EXACTLY three big bodyguards on each of its sides.  浣曚負(fù)big bodyguards? 鎴戜及璁℃槸澶у啓瀛楁瘝錛屽嵆瑕佹眰鎵懼埌鐢變笁涓ぇ鍐欏瓧姣嶅寘鍥寸潃鐨勫皬鍐欏瓧姣嶃備簨瀹炰笂錛岄鐩姹傜殑紜姝ゃ備笉榪囨垜鍦ㄤ竴寮濮嬬殑鏃跺欒蛋浜嗗集璺細(xì)鎴戞妸榪炵畫鐨勪竷涓瓧姣嶅叏閮ㄩ兘鎵撳嵃鍑烘潵浜嗭紙宸﹁竟涓変釜澶у啓瀛楁瘝錛屼腑闂翠竴涓皬鍐欏瓧姣嶏紝鍙寵竟涓変釜澶у啓瀛楁瘝錛夛紝璐逛簡鍗婂ぉ鎵嶆悶鏄庣櫧鍘熸潵瑕佹眰鐨勫彧鏄腑闂寸殑灝忓啓瀛楁瘝銆?br>  鍙﹀娉ㄦ剰EXACTLY 榪欎釜璇嶏紝鍗?#8220;褰撲笖浠呭綋”宸﹀彸涓よ竟鍧囦負(fù)“涓?#8221;涓ぇ鍐欏瓧姣嶇殑pattern鎵嶇畻銆?br>
  浠g爜鍒頒篃綆鍗曪細(xì)

import re

if __name__ == '__main__':    
    finpath 
= 'fin.txt'
    with open(finpath) as fin:
        
# translate text into a single string
        text = ''.join([line.rstrip() for line in fin.read()])
        pattern 
= re.compile(r'[^A-Z][A-Z]{3}([a-z])[A-Z]{3}[^A-Z]')
        
print(''.join(pattern.findall(text)))

紼嬪簭杈撳嚭錛歭inkedlist

鍙傝冪瓟妗?/a>

]]>
Python Challenge lv2: ocrhttp://m.shnenglu.com/xmli/archive/2009/05/11/82574.html鏉庣幇姘?/dc:creator>鏉庣幇姘?/author>Mon, 11 May 2009 07:40:00 GMThttp://m.shnenglu.com/xmli/archive/2009/05/11/82574.htmlhttp://m.shnenglu.com/xmli/comments/82574.htmlhttp://m.shnenglu.com/xmli/archive/2009/05/11/82574.html#Feedback0http://m.shnenglu.com/xmli/comments/commentRss/82574.htmlhttp://m.shnenglu.com/xmli/services/trackbacks/82574.htmlhttp://www.pythonchallenge.com/pc/def/ocr.html
  鏍規(guī)嵁鎻愮ず錛岄鐩姹傛槸浠巋tml欏甸潰婧愭枃浠剁殑涓孌墊枃鏈腑鎵懼嚭rare characters銆?浣曚負(fù)rare錛屾殏鏃朵笉鐭ラ亾錛屼笉榪囦笉瑕佺揣錛屽厛鎶婃暣孌墊枃鏈瓨鏀句簬涓涓彨fin.txt鐨勬枃浠朵腑錛岄澶勭悊涓涓嬶細(xì)

if __name__ == '__main__':
    
    finpath 
= 'fin.txt'
    with open(finpath) as fin:
        
# translate text into a single string
        text = ''.join([line.rstrip() for line in fin.read()])
        
        d
= {}
        
for c in text:
            d[c] 
= d.get(c, 0) +1
        
        
for k, v in d.items():
            
print(k, v)

杈撳嚭緇撴灉錛?br>
! 6079
# 6115
% 6104
$ 6046
& 6043
) 6186
( 6154
+ 6066
* 6034
@ 6157
[ 6108
] 6152
_ 6112
^ 6030
a 1
e 1
i 1
l 1
q 1
u 1
t 1
y 1
{ 6046
} 6105

  濂戒簡錛屽緢鏄劇劧浜嗭紝 rare characters鎸囩殑灝辨槸涓暟涓?鐨勮繖鍑犱釜瀛楁瘝錛?浜庢槸灝嗕唬鐮佺◢寰敼涓涓嬪嵆鍙墦鍗板緱鍒扮粨鏋滐細(xì)

if __name__ == '__main__':
    
    finpath 
= 'fin.txt'
    with open(finpath) as fin:
        
# translate text into a single string
        text = ''.join([line.rstrip() for line in fin.read()])
        
        d
= {}
        
for c in text:
            d[c] 
= d.get(c, 0) +1
            
        
print(''.join([c for c in text if d[c] ==1]))

  紼嬪簭杈撳嚭錛?equality
  
  鑰冭檻鍒扮粨鏋滈泦涓湭杈撳嚭鐨勯兘鏄潪瀛楁瘝錛屽洜姝ゅ彲浠ヨ冭檻濡備笅鏂規(guī)硶姹傝В錛?br>
if __name__ == '__main__':
    
    finpath 
= 'fin.txt'
    with open(finpath) as fin:
        
# translate text into a single string
        text = ''.join([line.rstrip() for line in fin.read()])
        
# only print letters
        print(''.join([c for c in text if c.isalpha()]))
        
# another method
        print(''.join(filter(lambda x: x.isalpha(), text)))

  鍙傝冪瓟妗?/a>



]]>
Python Challenge lv1: What about making trans?http://m.shnenglu.com/xmli/archive/2009/05/11/82567.html鏉庣幇姘?/dc:creator>鏉庣幇姘?/author>Mon, 11 May 2009 07:05:00 GMThttp://m.shnenglu.com/xmli/archive/2009/05/11/82567.htmlhttp://m.shnenglu.com/xmli/comments/82567.htmlhttp://m.shnenglu.com/xmli/archive/2009/05/11/82567.html#Feedback0http://m.shnenglu.com/xmli/comments/commentRss/82567.htmlhttp://m.shnenglu.com/xmli/services/trackbacks/82567.htmlhttp://www.pythonchallenge.com/pc/def/map.html
  鐢變簬浠呬粎鏄浜岄亾棰橈紝鎵浠ラ鐩繕鏄緢鏄撴噦鐨勶紝鎸夊浘鐗囦腑鐨勬寚紺猴紝灝嗘瘡涓瓧姣嶆浛鎹㈡垚瀹冨湪瀛楁瘝琛ㄤ腑欏哄歡涓や綅鐨勯偅涓瓧姣嶅氨鍙互浜嗭紝瑙g瓟濡備笅錛氥?br>
def trans(char):
    
'''Translate a letter as the one two places after it'''
    
if char.isalpha():
        
return chr((ord(char)- ord('a'+ 2)%26 + ord('a'))
    
return char

if __name__ == '__main__':
    text 
= '''g fmnc wms bgblr rpylqjyrc gr zw fylb. rfyrq ufyr amknsrcpq ypc dmp. bmgle gr gl zw fylb gq glcddgagclr ylb rfyr'q ufw rfgq rcvr gq qm jmle. sqgle qrpgle.kyicrpylq() gq pcamkkclbcb. lmu ynnjw ml rfc spj. '''
    
print(''.join(map(trans, text)))

  鎵撳嵃緇撴灉錛?i hope you didnt translate it by hand. thats what computers are for. doing it in by hand is inefficient and that's why this text is so long. using string.maketrans() is recommended. now apply on the url.


  鍙傝冪瓟妗堥摼鎺?/a>



]]>
久久伊人精品青青草原日本| 99精品国产综合久久久久五月天| 精品国际久久久久999波多野| 久久精品人人做人人爽97| 久久国产精品99久久久久久老狼| 99久久婷婷国产综合亚洲| 国产—久久香蕉国产线看观看| 手机看片久久高清国产日韩| 一个色综合久久| 亚洲国产成人久久综合碰碰动漫3d| 久久久精品波多野结衣| 亚洲精品美女久久777777| 亚洲伊人久久大香线蕉苏妲己| 亚洲人成无码久久电影网站| 久久丫精品国产亚洲av不卡| 欧美一级久久久久久久大片| AV狠狠色丁香婷婷综合久久| 亚洲国产一成久久精品国产成人综合 | 久久精品国产半推半就| 欧美性猛交xxxx免费看久久久| 国产精品九九九久久九九| 2020国产成人久久精品| 99久久免费只有精品国产| 日本人妻丰满熟妇久久久久久| 精品久久久久久无码人妻热| 久久66热人妻偷产精品9| 国产精品亚洲综合久久| 久久精品成人欧美大片| 亚洲午夜久久影院| 国产精品成人99久久久久| 国产精品久久久福利| AV无码久久久久不卡蜜桃 | 无码任你躁久久久久久| 91性高湖久久久久| 亚洲国产精品久久久久婷婷软件 | 人妻中文久久久久| 国产精品久久久天天影视香蕉 | 国产亚洲综合久久系列| 人妻久久久一区二区三区| 亚洲成色www久久网站夜月| 亚洲欧美成人综合久久久 |