Python Language Reference


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 全局
					

Table of contents


  1. Data Model
  2. f-string Formatting Statement
  3. Compound Statement
  4. import Module Import Statement