原创 解釋關於python中if __name__ == '__main__':

若有幫助到你,記得點贊u。# -*- coding: utf-8 -*- """ Created on Fri Apr 6 20:25:02 2018 @author: Lelouch_C.C """ print(__name__

原创 以flatten()函數爲例講解生成器

若有幫助到你,記得點贊哦!# -*- coding: utf-8 -*- """ Created on Fri Mar 30 20:53:08 2018 @author: Lelouch_C.C """ """ 任何包含yield

原创 列表推導式和生成器推導式

若有幫助到你,記得點贊u。# -*- coding: utf-8 -*- """ Created on Wed Mar 28 11:05:02 2018 @author: Lelouch_C.C """ #列表推導式:[...]

原创 python基礎:operator.itemgetter函數

# -*- coding: utf-8 -*- """ Created on Fri Apr 20 09:59:42 2018 @author: Lelouch_C.C """ #operator模塊提供的itemgetter函數用於獲

原创 python入門:類的多重繼承問題、重寫、未綁定的超類方法、super()

若有幫助到你,記得點贊哦!參考:python基礎教程第二版 Hetland# -*- coding: utf-8 -*- """ Created on Mon Mar 19 15:18:20 2018 @author: Lelouc

原创 python入門:shelve模塊

若有幫助到你,記得點贊o。import shelve s=shelve.open('test.dat') #open函數以文件名爲參數,它會返回一個shelf對象,用來儲存數據。 #它的工作方式有點像字典。但鍵一定要是字符串,將內容儲存到

原创 python入門:關於堆操作的一個模塊heapq及其函數

若有幫助到你,記得點贊u。# -*- coding: utf-8 -*- """ Created on Fri Apr 6 20:25:02 2018 @author: Lelouch_C.C """ #python中沒有獨立的對

原创 python入門:靜態方法、類成員方法

若有幫助到你,記得點贊哦!參考:python基礎教程第二版 Hetland# -*- coding: utf-8 -*- """ Created on Thu Mar 22 09:52:45 2018 @author: Lelouc

原创 tolist()作用於矩陣

若有幫助到你,記得點贊哦!# -*- coding: utf-8 -*- """ Created on Sun Mar 25 09:58:19 2018 @author: Lelouch_C.C """ from numpy im

原创 機器學習實戰:樹迴歸中getMean()遞歸解釋

若有幫助到你,記得點贊、收藏哦!# -*- coding: utf-8 -*- """ Created on Thu Mar 22 20:33:41 2018 @author: Loulch C.C """ """ T

原创 tile()函數

若有幫助到你,記得點贊哦!# -*- coding: utf-8 -*- """ Created on Thu Nov 16 19:13:21 2017 @author: Lelouch_C.C """ #tile()函數用來複制