Time of Update: 2018-03-03
標籤:cli input object bin str 網路 磁碟 int enc 最近在啃《python核心編程(第三版)》,感覺這本書並不是特別的友好,雖然有基於python3提出的改進代碼
Time of Update: 2018-03-03
標籤:font 學習編程 iter 失效 好的 導致 教程 其他 提示符 1.2.1
Time of Update: 2018-03-02
標籤:自訂函數 中間 col 容器 axis tin 儲存 重複數 nump da array:
Time of Update: 2018-03-03
標籤:綁定 adl art 參數 一個 sch get mil span 一個線程使用自己的局部變數比使用全域變數好局部變數只有線程自己能看見,不會影響其他線程全域變數的修改必須加鎖Thread
Time of Update: 2018-03-02
標籤:Python標準庫在Linux作業系統上編寫shell指令碼時, 主要涉及到執行系統命令, 目錄和檔案操作. 那麼在python中怎麼辦呢, 這主要是幾個模組的使用: os, os.path, shutil和sys...os模組包含了大部分的Linux命令, 簡單舉例如下:In [1]: import osIn [2]: os.system('ls -l')total 12-rw-r--r-- 1 root root 107 Mar 1 19:31
Time of Update: 2018-03-02
標籤:conf ret ini ati bit example remove forward 配置 此模組用於產生和修改常見配置文檔,當前模組的名稱在 python 3.x 版本中變更為
Time of Update: 2018-03-01
標籤:money 情況下 exception put trace color 必須 異常 python money = input(‘輸入多少錢:‘)months = input(‘還幾個月:‘
Time of Update: 2018-02-28
標籤:body color oca style setup 編譯安裝 ble nss bsp # 背景安裝pip後發現執行pip install pytest,提示下面錯誤pip is
Time of Update: 2018-02-27
標籤:[] div qsort range int tor app sid coding python看了好多遍,沒怎麼coding,這裡簡單寫個 1 #!/usr/bin/python 2
Time of Update: 2018-02-26
標籤:python 基礎 笨方法學習python 以下學習內容以python2為基準UTF-8#conding:utf-8 or #__coding:utf-8__此句要置頂,表示代碼支援UTF8的格式,最好每個代碼檔案都加上注釋# A comment, this
Time of Update: 2018-02-27
標籤:content 序列 ali start width 字串 class re模組 one 一、Regex對字串的操作的需求幾乎無處不在,比如網站註冊時輸入的手機號、郵箱判斷是否合法。雖然可
Time of Update: 2018-02-25
標籤:while ext elf odi 鏈表 one foo data- 面試 翻轉一個鏈表您在真實的面試中是否遇到過這個題? Yes 範例給出一個鏈表1->2-&g
Time of Update: 2018-02-25
標籤:說明 python class let __new__ log 預設 nbsp 模式 使用__new__方法可以實現單例模式:class SingleTon(object):
Time of Update: 2018-02-25
標籤:單例 bsp use on() def 屬性 pos 模組 字典 1 使用__new__方法class Singleton(object): def _
Time of Update: 2018-03-02
python爬蟲面試寶典(常見問題),python面試寶典 是否瞭解線程的同步和非同步?線程同步:多個線程同時訪問同一資源,等待資源訪問結束,浪費時間,效率低線程非同步:在訪問資源時在空閑等待時同時訪問其他資源,實現多線程機制 是否瞭解網路的同步和非同步?同步:提交請求->等待伺服器處理->處理完畢返回 這個期間用戶端瀏覽器不能幹任何事非同步: 請求通過事件觸發->伺服器處理(這是瀏覽器仍然可以作其他事情)->處理完畢
Time of Update: 2018-02-27
Python基礎——for/while迴圈,pythonwhile Python版本:3.6.2 作業系統:Windows
Time of Update: 2018-02-28
Python 關於supper 的 用法和原理(挖坑),pythonsupper一、前言Python 物件導向中有繼承這個概念,初學時感覺很牛逼,裡面也有個super類,經常見到,最近做一些題才算是理解了。特地記錄分享給後來研究的小夥伴,畢竟現在小學生都開始學了(滑稽臉)二、代碼直接上乾貨,能把下面一個問題全答對,後面就不用看了。class A(): def go(self): print ("go A go!") def stop(self):
Time of Update: 2018-02-27
python 3.x
Time of Update: 2018-02-27
python 3.x 學習筆記16 (隊列queue 以及 multiprocessing模組),1.隊列(queue)用法:import queueq = queue.Queue() #先進先出模式q.put(1) #存放資料在q裡 作用: 1)解耦 2)提高效率class queue.Queue(maxsize=0)
Time of Update: 2018-02-27
武道之路-煉體期六重天(年已過,恢複更新),之路六重產生器:調用的時候才產生的資料(惰性計算,協程:保留上次進入的狀態,每次程式進入,相當於調用上一次的狀態,非同步),單線程下的並發效果(不同角色間切換)。(3.x)range(),列表產生式 [i*i for i in range(20)], 檔案讀取:for line in f: