锘??xml version="1.0" encoding="utf-8" standalone="yes"?>久久亚洲高清观看,国产精品久久久久久福利漫画,亚洲中文字幕久久精品无码APPhttp://www.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://www.shnenglu.com/xmli/archive/2009/05/11/82588.html鏉庣幇姘?/dc:creator>鏉庣幇姘?/author>Mon, 11 May 2009 08:54:00 GMThttp://www.shnenglu.com/xmli/archive/2009/05/11/82588.htmlhttp://www.shnenglu.com/xmli/comments/82588.htmlhttp://www.shnenglu.com/xmli/archive/2009/05/11/82588.html#Feedback0http://www.shnenglu.com/xmli/comments/commentRss/82588.htmlhttp://www.shnenglu.com/xmli/services/trackbacks/82588.htmlhttp://www.pythonchallenge.com/pc/def/peak.html
 榪欐槸鍙嶅簭鍒楀寲鐨勪竴閬撻pickle錛岄〉闈㈡簮鐮佷腑鐨刡anner.p鐨勫瓧鏍鳳紝 涓哄簭鍒楀寲鏂囦歡鍦板潃銆備絾瑙f瀽鐨勭粨鏋滃茍涓嶆槸鏈緇堢殑絳旀錛岃姳浜?jiǎn)鍗婂ぉ鏃堕棿缁堜簬寮勬槑鐧骄l撴灉鏄竴涓敤‘#’瀛楃粍鎴愮殑鍥懼艦錛屽憸鍛鹼細(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://www.shnenglu.com/xmli/archive/2009/05/11/82578.html鏉庣幇姘?/dc:creator>鏉庣幇姘?/author>Mon, 11 May 2009 08:05:00 GMThttp://www.shnenglu.com/xmli/archive/2009/05/11/82578.htmlhttp://www.shnenglu.com/xmli/comments/82578.htmlhttp://www.shnenglu.com/xmli/archive/2009/05/11/82578.html#Feedback0http://www.shnenglu.com/xmli/comments/commentRss/82578.htmlhttp://www.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()] 灝嗘墍鏈夌殑鏁板瓧閮界矘榪炶搗鏉ヤ簡(jiǎn)錛岀粨鏋滆窡韙埌4000澶氳繕娌$粨鏉燂紝鎵嶇煡閬撲笂褰撲簡(jiǎn)銆傘傘?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錛岄鐩腑鏈鏃╃粰鍑虹殑鍙笉鏄繖涓鹼紝 鎴戞槸浠庡湴鍧鍒楄〃鐨勫悗涓閮ㄥ垎閫変簡(jiǎn)涓涓暟瀛楄屽凡錛屽洜姝や笉瑕佹媴蹇?

]]>
Python Challenge lv3: rehttp://www.shnenglu.com/xmli/archive/2009/05/11/82577.html鏉庣幇姘?/dc:creator>鏉庣幇姘?/author>Mon, 11 May 2009 07:52:00 GMThttp://www.shnenglu.com/xmli/archive/2009/05/11/82577.htmlhttp://www.shnenglu.com/xmli/comments/82577.htmlhttp://www.shnenglu.com/xmli/archive/2009/05/11/82577.html#Feedback0http://www.shnenglu.com/xmli/comments/commentRss/82577.htmlhttp://www.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? 鎴戜及璁℃槸澶у啓瀛楁瘝錛屽嵆瑕佹眰鎵懼埌鐢變笁涓ぇ鍐欏瓧姣嶅寘鍥寸潃鐨勫皬鍐欏瓧姣嶃備簨瀹炰笂錛岄鐩姹傜殑紜姝ゃ備笉榪囨垜鍦ㄤ竴寮濮嬬殑鏃跺欒蛋浜?jiǎn)寮矾锛?xì)鎴戞妸榪炵畫(huà)鐨勪竷涓瓧姣嶅叏閮ㄩ兘鎵撳嵃鍑烘潵浜?jiǎn)锛堝乏杈逛笁涓ぇ鍐欏瓧姣嶅Q屼腑闂翠竴涓皬鍐欏瓧姣嶏紝鍙寵竟涓変釜澶у啓瀛楁瘝錛夛紝璐逛簡(jiǎn)鍗婂ぉ鎵嶆悶鏄庣櫧鍘熸潵瑕佹眰鐨勫彧鏄腑闂寸殑灝忓啓瀛楁瘝銆?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://www.shnenglu.com/xmli/archive/2009/05/11/82574.html鏉庣幇姘?/dc:creator>鏉庣幇姘?/author>Mon, 11 May 2009 07:40:00 GMThttp://www.shnenglu.com/xmli/archive/2009/05/11/82574.htmlhttp://www.shnenglu.com/xmli/comments/82574.htmlhttp://www.shnenglu.com/xmli/archive/2009/05/11/82574.html#Feedback0http://www.shnenglu.com/xmli/comments/commentRss/82574.htmlhttp://www.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

  濂戒簡(jiǎn)錛屽緢鏄劇劧浜?jiǎn)锛?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://www.shnenglu.com/xmli/archive/2009/05/11/82567.html鏉庣幇姘?/dc:creator>鏉庣幇姘?/author>Mon, 11 May 2009 07:05:00 GMThttp://www.shnenglu.com/xmli/archive/2009/05/11/82567.htmlhttp://www.shnenglu.com/xmli/comments/82567.htmlhttp://www.shnenglu.com/xmli/archive/2009/05/11/82567.html#Feedback0http://www.shnenglu.com/xmli/comments/commentRss/82567.htmlhttp://www.shnenglu.com/xmli/services/trackbacks/82567.htmlhttp://www.pythonchallenge.com/pc/def/map.html
  鐢變簬浠呬粎鏄浜岄亾棰橈紝鎵浠ラ鐩繕鏄緢鏄撴噦鐨勶紝鎸夊浘鐗囦腑鐨勬寚紺猴紝灝嗘瘡涓瓧姣嶆浛鎹㈡垚瀹冨湪瀛楁瘝琛ㄤ腑欏哄歡涓や綅鐨勯偅涓瓧姣嶅氨鍙互浜?jiǎn)锛岃В绛斿涓嬪Q氥?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>



]]>
久久精品国产一区二区三区日韩| 国产精品嫩草影院久久| 性欧美大战久久久久久久| 亚洲国产成人精品91久久久| 亚洲中文字幕久久精品无码喷水| 少妇久久久久久久久久| 久久久久综合中文字幕 | 精品久久久久中文字幕日本| 亚洲精品综合久久| 久久一区二区免费播放| 成人精品一区二区久久| 久久久久久精品成人免费图片| 欧美亚洲另类久久综合婷婷 | 久久久婷婷五月亚洲97号色| 日本三级久久网| 午夜天堂av天堂久久久| 久久无码精品一区二区三区| 亚洲国产精品高清久久久| 国产精品免费久久| 激情伊人五月天久久综合| 区久久AAA片69亚洲| 久久久久久亚洲精品不卡| 新狼窝色AV性久久久久久| 久久亚洲2019中文字幕| www亚洲欲色成人久久精品| 2021久久精品国产99国产精品| 久久久无码精品亚洲日韩蜜臀浪潮| 久久精品人妻一区二区三区| 日本精品久久久久中文字幕8| 久久国产精品77777| 亚洲色欲久久久综合网东京热| 美女久久久久久| 久久久久国产视频电影| 久久综合伊人77777| 久久久久亚洲av毛片大| 久久久久国产视频电影| 久久久WWW免费人成精品| 日批日出水久久亚洲精品tv| 久久久噜噜噜久久| 久久久久久毛片免费看| 久久综合久久美利坚合众国|