标签:读取 pre info word spl nes adl close 文件
"""
read():读取整个文件。
readline():读取一行数据。
readlines():读取所有行的数据。
"""
user_file = open("user_info","r")
lines = user_file.readlines()
user_file.close()
for line in lines:
username = line.split(",")[0]
password = line.split(",")[1]
print(username,password)
标签:读取 pre info word spl nes adl close 文件
原文地址:https://www.cnblogs.com/zhang-da/p/12210588.html