1、读取文件
语法: f = open(file = ‘/Users/crazy_heng/PycharmProjects/untitled/day1/usernam‘,mode = ‘r‘,encoding=‘utf-8‘)
file = ‘/Users/crazy_heng/PycharmProjects/untitled/day1/usernam # 表示username这个文件的路径
mode = ‘r‘ # 表示只读
标签:读取文件 led 读取 name user file 文件的 div 表示
1、读取文件
语法: f = open(file = ‘/Users/crazy_heng/PycharmProjects/untitled/day1/usernam‘,mode = ‘r‘,encoding=‘utf-8‘)
file = ‘/Users/crazy_heng/PycharmProjects/untitled/day1/usernam # 表示username这个文件的路径
mode = ‘r‘ # 表示只读
标签:读取文件 led 读取 name user file 文件的 div 表示
原文地址:https://www.cnblogs.com/aaaajayheng1990/p/8726988.html