Python 语言参考。
def readText_fun(file, lists=[]): # 定义 "读取文本" 方法 from os.path import isfile if isfile(file): with open(file, encoding=encoding, mode="r") as file_object: lists += file_object.readlines() return lists lists=[] 代表模块 global 全局
Previous topic
Next topic
Quick search