Time of Update: 2017-11-05
標籤:結構 cal 特色 python 表達方式 statement 學習 mil print python最具特色的是用縮排來標明成塊的代碼 我們下面用if選擇結構舉例,if後面跟隨
Time of Update: 2017-11-05
標籤:one assm log none 單例模式 div nbsp instance span class SingleObj(): __singleobj=None
Time of Update: 2017-11-04
標籤:一個 false arc 遍曆 logs ini div one 頭部 1 class Node(): 2 def __init__(self,item): 3
Time of Update: 2017-11-04
標籤:str 體會 原來 不能 self 動手 就是 sel alt 學習東西真的需要自己動手,然後遇到問題,自己學著去解決。當然如果能得到高人指點,那真是走了八輩子運了。可以節省很多時間。但是
Time of Update: 2017-11-03
標籤:link 定義 常見 檔案類型 記憶體 分區 reg du命令 路徑 檔案作業系統的介紹ext4的superblock塊是超級快,innode 塊是專門存放檔案資訊的,block
Time of Update: 2017-11-04
標籤:讀寫 函數庫 pytho 寫檔案 html 組合 post log .com 1、r 開啟唯讀檔案,該檔案必須存在。 2、r+ 開啟可讀寫的檔案,該檔案必須存在。 3、
Time of Update: 2017-11-04
標籤:range 實踐 list 數組 報錯 情境 print 範圍 數字 range(1,5) 定義了從1開始到4的整數 [1,2,3,4]情境1:numbers = range(1,5)
Time of Update: 2017-11-03
標籤:blog cti www. object log string nts 兩種方法 cells python中有兩種方法可以判斷指定的索引值是否存在,一種是通過字典對象的方法
Time of Update: 2017-11-04
標籤:python selenium copyright width mat while contain tin classes 遇到一個網站運行很慢,所以要等待某個元素顯示出來之後再進行操作,
Time of Update: 2017-11-04
標籤:副本 add back get ble 切片 new nan tom 處理Python的部分元素,稱之為切片。 建立切片
Time of Update: 2017-11-03
標籤:python 高階函數 匿名函數 1. 高階函數高階函數就是把函數當成參數傳遞的一種函數舉例:def add(x, y, f): return f(x) + f(y)print (add(-8, 11, abs))返回結果:19① map() 函數map()
Time of Update: 2017-11-03
標籤:python一般輸出到螢幕的時候是一組資料一次性全部顯示出來得。這是因為電腦為了提高效率,資料會先暫時放入緩衝,等緩衝滿了或者操作結束了,再一次性將資料進行處理。類似進度條的情況需要字元一次一個的蹦出來,這時候就需要使用flush()來強制執行這個處理緩衝內資料的操作。上課講檔案flush()的時候,最後提到了這個。就先抄下來了。import sys,timefor i in range(20): sys
Time of Update: 2017-11-04
標籤:不能 課堂 輸入 疑惑 運行 通過 代碼 python str 1..Python能做些什嗎?
Time of Update: 2017-11-03
標籤:http iterable 函數定義 sum 儲存 ext 處理 迭代 .com 產生式和產生器列表產生式是Python最受歡迎的文法之一,通過間接的文法可以對一組元素進行過濾,還可以對元
Time of Update: 2017-11-03
標籤:目前時間 print time() 輸出 cond second 5.0 odi int 直接上代碼 其中有注釋 #coding=utf-8import timeimport
Time of Update: 2017-11-03
標籤:function strong func django psi button 啟用 star other html頭部{% extends ‘base.html‘ %}{% load
Time of Update: 2017-11-03
標籤:有一個 函數對象 none war 單例模式 src int 執行 多個 單例模式(Singleton
Time of Update: 2017-11-05
Django學習案例一(blog):一.建立項目、APP,djangoapp1.建立project方法一:使用命令列建立項目。在D盤cmd執行如下命令:django-admin.py startproject
Time of Update: 2017-11-03
python寫入檔案編碼報錯,decode的作用是將其他編碼的字串轉換成unicode編碼,如str1.decode('gb2312'),表示將gb2312編碼的字串str1轉換成unicode編碼。encode的作用是將unicode編碼轉換成其他編碼的字串,如str2.encode('gb2312'),表示將unicode編碼的字串str2轉換成gb2312編碼。 幕後處理時用decode,將資料寫入檔案中時用encode
Time of Update: 2017-11-03
格式化字元 %s %d %f,%s%f格式化輸出資訊:%s 代表string字串%d 有符號整數(十進位),協助檢驗數字類型%f 浮點數字(用小數點符號)1)%s 執行個體:name=input("name: ")age=input("age: ")job=input("job: ")salary=input("salary: ")info='''----info of %s-----Name:%sAge:%sJob:%sSalary:%s''' %