Time of Update: 2017-07-30
標籤:中學 除法 sum zip 空格 color int 定義 log 還記得中學時候學過的楊輝三角嗎?具體的定義這裡不再描述,你可以參考以下的圖形:11 11 2 11 3 3 11 4 6
Time of Update: 2017-07-30
標籤:輸出 包括 cin order apple 引用 不同 strong 方法 Python算術運算子以下假設變數: a=10,b=20:運算子描述執行個體+加 - 兩個對象相加a
Time of Update: 2017-07-30
標籤:解決 網址 color Regex find 編寫 eth admin utf-8 通過python 來實現這樣一個簡單的爬蟲功能,把我們想要的圖片爬取到本地。(Pyt
Time of Update: 2017-07-29
標籤:lex 次方 ice 儲存 返回 小數點 序列 等等 oct 一、數字類型 Python 支援多種數字類型,包括:整型、長整型、布爾型、雙精確度浮點型、十進位浮點型、
Time of Update: 2017-07-28
標籤:div line import adl mic 結果 寫法 文本 轉換 因業務需求,需要提取文本中帶有檢查字樣的每一行。樣本如下:1 投入10kVB、C母分段820閉鎖備自投壓板 2
Time of Update: 2017-07-29
標籤:not doc ase item 令行 hosts manager exit data Python API
Time of Update: 2017-07-30
標籤:技術分享 out 習題 輸入提示 name nbsp live gif pre 習題 14:提示和傳遞 讓我們使用 argv 和 raw_input
Time of Update: 2017-07-28
標籤:attr port net 說明 exce 資料 預設 類型 http
Time of Update: 2017-07-29
標籤:範圍 命名空間 報錯 from 怎麼辦 size 邏輯 回憶 之間 高階函數除了可以接受函數作為參數外,還可以把函數作為結果值返回。在這裡我們首先回憶一下python代碼啟動並執行時候遇到
Time of Update: 2017-07-29
標籤:目錄 before 類型 遞迴 根據 color imp os.walk 指令碼 最近在學習python,閑著無聊就試著寫啦這個小的指令碼,雖然有很多不足,但是還是收穫不少。該指令碼的功能
Time of Update: 2017-07-28
標籤:python 不用 break break#!/usr/bin/env python3# -*- coding: utf-8 -*-# line="-rw-rw-rw- 1 user group
Time of Update: 2017-07-29
標籤:知識庫 逗號 lan 匯入錯誤 name direction 字典 erro 字串 >>> with open("login.txt","r+",ending="utf-
Time of Update: 2017-07-29
標籤:形參 ucid luci attach 函數 ons utils 逗號 its 1.編寫一個名為right_justify的函數,函數接受一個名為``s``的字串作為形參,
Time of Update: 2017-07-27
標籤:資料 學習 minutes 運算式 reg 建立 反轉 asd 位置 目錄: 內容: 類型函數: 1、typeof 只能判斷基礎資料型別 (Elementary Data
Time of Update: 2017-07-27
標籤:建立 命令 資訊 9.png blog 密碼 http bsp sdi 1. 在pypi.python.org網站註冊一個使用者,記住使用者名稱和密碼。2. 編寫需要上
Time of Update: 2017-07-30
學習了list,試寫一段購物車程式,list購物車 1 #!/usr/bin/env python 2 # -*- coding: utf-8 -*- 3 # Author:Mgin 4 shopping_car = [] 5 salary = int(input("your salary:")) 6 goods_list = [["Watch",20000],["ThinkPad",8500],["IPhone",5800 ],["Suit",3700],["Boost shoes",1700
Time of Update: 2017-07-30
day7物件導向--反射,day7物件導向--反射 通過字串映射或修改程式運行時的狀態、屬性、方法, 有以下4個方法 1、getattr(object, name[, default]) -> value Get a named attribute from an object; getattr(x, 'y') is equivalent to
Time of Update: 2017-07-30
Python——冒泡演算法,python冒泡冒泡演算法:對於要排序的序列,每次將兩個元素進行比較,如果排序錯誤則將兩者進行交換,直到完成排序。 以數列 li = [12,22,3,11,8,10] 為例:for m in range(len(li)-1): for n in range(m+1,len(li)): if li[m] > li[n]: temp = li[n] li[n] = li[m]
Time of Update: 2017-07-29
day6物件導向--繼承、多態,day6物件導向--多態繼承 繼承:就像遺傳一樣,繼承就是擁有父類的所有方法和屬性,並且能夠定義自己獨特的屬性和方法,對上面的類進行擴充。 可以什麼都不寫,直接繼承父類,如下: class People(object): def __init__(self,name,age): self.name = name
Time of Update: 2017-07-29
爬蟲——Scrapy架構,scrapy架構Scrapy是用純Python實現的一個為了爬取網站資料、提取結構性資料而編寫的應用程式框架,用途非常廣泛。架構的力量,使用者只需要定製開發幾個模組就可以輕鬆的實現一個爬蟲,用來爬取網頁內容以及各種圖片,非常方便。Scrapy使用了Twisted非同步網路架構來處理網路通訊,可以加快我們的下載速度,不用自己實現非同步架構,並且包含了各種中介軟體介面,可以靈活的完成各種需求。Scrapy架構圖Scrapy