Time of Update: 2017-01-08
標籤:pythonimport easygui flavor = easygui.buttonbox("what is your favorite?", choices = ["vanilla","chocolate","strawberry"]) easygui.msgbox ("you picked&nb
Time of Update: 2017-01-08
標籤:浮點 圖形 str 資料類型 比較 視頻 2.3 數學計算 包括 電腦顧名思義就是可以做數學計算的機器,因此,電腦程式理所當然地可以處理各種數值。
Time of Update: 2017-01-08
標籤:bsp 插入 字串包含 換行 表示 常用 注意 python 特殊字元 前面我們講解了什麼是字串。字串可以用‘‘或者""括起來表示。如果字串本身包含‘怎麼辦?比如我們要表示字串
Time of Update: 2017-01-08
標籤:guid 字串包含 gui line 避免 uid class 字元 標記法 如果一個字串包含很多需要轉義的字元,對每一個字元都進行轉義會很麻煩。為了避免這種情況,我們可以在字串前面加個首
Time of Update: 2017-01-08
標籤:.com port log color 連接埠 郵箱 email ddr import 1 import smtplib 2 from email.mime.text import
Time of Update: 2017-01-08
標籤:英文 學習 指定 慕課 print 開頭 原因 表示 記憶體 在Python中,變數的概念基本上和初中代數的方程變數是一致的。例如,對於方程式 y=x*x ,x就是變數
Time of Update: 2017-01-08
標籤:pip .com win word 地址 bs4 html解析 爬蟲 software 因為做網頁爬蟲,需要用到一個爬新聞的BeautifulSoup
Time of Update: 2017-01-07
標籤:remove 使用 函數 集合 move index 學習 -- 特性 1.集合的特性 1).唯一。即裡面的元素不能有重複的,但是聲明時並不會報錯,只是他會把 重複的元素刪除一個。
Time of Update: 2017-01-08
標籤:simple scripts proc ack bsp 內容 ;; ima src Python在使用過程中會用到大量的第三方庫,逐一手工去下載、安裝比較繁瑣。可以配置第三方鏡像源並使用p
Time of Update: 2017-01-07
標籤:idt log line 分享 清空 ima 參數 nbsp img 1.檔案 open(file, mode=‘r‘, buffering=-1, encoding=None,
Time of Update: 2017-01-07
標籤:調用 元組 內建函數 log 對象 方法 map strong color 一、基本形式sorted(iterable[, cmp[, key[, reverse]]])iterable.
Time of Update: 2017-01-07
標籤:自己 idt 常用 實現 http 基礎 支援 9.png 匹配 1. Regex基礎1.1.
Time of Update: 2017-01-07
標籤:copyright python default print "enter your name", somename=raw_input() print somename 結果如下 print “enter your name” 後有逗號 “,” 輸入的內容會在同一行顯示 Python 2.7.6 (default, Nov 10 2013
Time of Update: 2017-01-07
標籤:字串 元組 列表 核心部分 bsp mat 程式 http 技術分享 一:介紹1.為什麼使用內建對象 物件類型是語言的一個部分 內建對象構成了每個python程式的核心部分
Time of Update: 2017-01-07
標籤:his osi 操作符 接受 int lease 包含 不同 one 2-5#寫一個while迴圈,輸出整型為0~10a=0while a<11: print a a+=
Time of Update: 2017-01-08
Python高手之路【六】python基礎之字串格式化,python之路Python的字串格式化有兩種方式: 百分比符號方式、format方式百分比符號的方式相對來說比較老,而format方式則是比較先進的方式,企圖替換古老的方式,目前兩者並存。[PEP-3101]This PEP proposes a new system for built-in string formatting operations, intended as a replacement for the
Time of Update: 2017-01-08
Python中的sort()方法使用基礎,pythonsort一、基本形式sorted(iterable[, cmp[, key[, reverse]]])iterable.sort(cmp[, key[, reverse]]) 參數解釋: (1)iterable指定要排序的list或者iterable,不用多說; (2)cmp為函數,指定排序時進行比較的函數,可以指定一個函數或者lambda函數,如:
Time of Update: 2017-01-08
Python高手之路【八】python基礎之requests模組,pythonrequests1、Requests模組說明Requests 是使用 Apache2 Licensed 許可證的 HTTP 庫。用 Python 編寫,真正的為人類著想。Python 標準庫中的 urllib2 模組提供了你所需要的大多數 HTTP 功能,但是它的 API 太渣了。它是為另一個時代、另一個互連網所建立的。它需要巨量的工作,甚至包括各種方法覆蓋,來完成最簡單的任務。
Time of Update: 2017-01-08
淺析python 中__name__ = '__main__' 的作用,__name___main__很多新手剛開始學習python的時候經常會看到python 中__name__ = \'__main__\' 這樣的代碼,可能很多新手一開始學習的時候都比較疑惑,python 中__name__ = '__main__' 的作用,到底幹嘛的?有句話經典的概括了這段代碼的意義:“Make a script both importable and
Time of Update: 2017-01-08
字串,字元Python初始基礎資料型別 (Elementary Data Type)之字串--道心兩種字串格式化第一種:字串 %s 數字%d name='i am %s' % 'daoxin'>>> name'i am daoxin' >>> name='i am %s,age %d' %('daoxin',13)>>> name'i am daoxin,age 13' name='i am %s,age