python函數模塊化

函數模塊化 1.python模塊可以在邏輯上組織Python程序,將相關的程序組織到一個模塊中去,使用良好的結構化設計,增加程序的重用性,提高代碼使用率 例子 輸入mytest.py def print_mytest(name):       return ("mytest=",name)   再創建一個文件爲mytest2.py mytest2 導入mytest.py import mytest
相關文章
相關標籤/搜索