python读文件和写入文件复习
with open("name.txt",'r') as read_file: for name in read_file: list_name = (name.split(',')) quchong = list(set(list_name)) with open("server_name",'w') as write_file: for item in quchong: write_file.writelines(item + '\n')
天天向上,空杯心态。