Time of Update: 2016-12-29
標籤:轉換 字串轉換 false nbsp code image bytes ascii 數字 bin() #二進位r = bin(11)print(r) # 0b1011oct()
Time of Update: 2016-12-29
標籤:self argv echo owa max 沒有 apache map main 這個指令碼是接地提供的思路,一句話爆破速度提升一千倍,看了他的文章然而沒有看到工具,思路很牛逼,我提供一
Time of Update: 2016-12-29
標籤:開始 isp 避免 one 擷取 dom content 迴圈 perror 爬遍整個網域名稱
Time of Update: 2016-12-29
標籤:python 嵌套函數嵌套函數是在函數內部用def再定義一個函數,如下:def test(): print(‘this is test function‘) def test2(): print(‘this is test2
Time of Update: 2016-12-29
標籤:python
Time of Update: 2016-12-29
標籤:python http服務 http.server simplehttpserver python2中: python -m SimpleHTTPServer 80 #
Time of Update: 2016-12-29
標籤:python 裝飾器 應用 執行個體# -*- coding:utf-8 -*-nhj# Author:Linimport timeuserna,passwd = ‘lin‘,‘abc123‘def authentication_method(auth_val): print(‘this is authentication
Time of Update: 2016-12-29
標籤:exist blog lxml shang class tree from res inf [本文出自天外歸雲的部落格園]從64365網站擷取全國各地律師電話號,用到了python的lxm
Time of Update: 2016-12-29
標籤:position write 轉換 應用 str ascii 編碼轉換 can range 在用python編碼時,經常會碰到編碼問題,UnicodeEncodeError:
Time of Update: 2016-12-29
標籤:進一步 定位 問題 perror 執行個體 轉換 自身 阻塞 功能 大家好,本節在這裡主要說的是URLError還有HTTPError,以及對它們的一些處理。1.URLError首先解釋下
Time of Update: 2016-12-29
標籤:default creat sock efault handle split pac map __init__ import socketserverimport struct# DNS
Time of Update: 2016-12-29
標籤:python 字串 school 程式 防偽 防偽碼:忘情公子著本篇我們來說說python的內建物件類型及其運算。 python有許多的內建類型,我們為什麼要使用內建類型呢?python編程時是盡量去使用自訂類型還是儘可能多的使用內建類型呢?
Time of Update: 2016-12-29
標籤:視窗 是你 tps fail 表徵圖 bsp 執行 令行 程式 在命令列中切換到要打包的程式所在目錄,或者在程式目錄開啟命令列,直接輸入下面的指令即可pyinstaller -F xxx.
Time of Update: 2016-12-29
def func1(): print 'hello world'res = func1()print type(res)def func2(): return ['xyz',10000,-98]atuple = func2()x,y,z = func2()print x,y,zdef func3(): return 'xyz',1000,-98x,y,z = func3()print x,y,zdef func4():
Time of Update: 2016-12-29
def func1(): try: return float('abc') except ValueError,e: print edef func2(): try: astr = 'abc' float(astr) except ValueError: astr = None return astrdef func3(): try: astr
Time of Update: 2016-12-29
import osls = os.linesepdef func1(): filename = raw_input('enter file name:') f = open(filename,'w') while True: alline = raw_input("enter a line ('.' to quit):") if alline != '.':
Time of Update: 2016-12-29
class C(object): def __call__(self, *args, **kwargs): print "I'm callable! called with args:\n",argsc = C()c('a',1)single_code = compile("print 'hello,world!'",'','single')exec(single_
Time of Update: 2016-12-29
def func1(): alist = ['Cathy','Terry','Joe','Health','Lucy'] for i in range(-1,-len(alist)-1,-1): print i,alist[i]def func2(): alist =
Time of Update: 2016-12-29
def func1(): dict1 = {} dict2 = {'name':'earth','port':80} return dict1,dict2def func2(): return dict((['x',1],['y',2]))def func3(): adict = {}.fromkeys(['x','y'],23) return
Time of Update: 2016-12-29
str1 = 'abced'for i in range(-1, -len(str1), -1) + [None]: print str1[:i]s, t = 'abc', 'def'print zip(s, t)for i, t in enumerate(str1): print i, tprint isinstance('foo', str)import stringdef checkid(): alphas