You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
460 B
22 lines
460 B
|
|
|
|
|
|
with open("aiessay_title_content.txt", encoding="utf-8") as f:
|
|
data = f.read()
|
|
|
|
data_list = data.split("----------")
|
|
|
|
|
|
data_new = []
|
|
for i in data_list:
|
|
data_dan_list = i.strip("\n").split("\n")
|
|
|
|
title = data_dan_list[0]
|
|
hexin = "".join(data_dan_list[1:])
|
|
data_new.append("@@@@@".join([title, hexin]))
|
|
|
|
|
|
with open("data/题目5-核心.txt","w", encoding="utf-8") as f:
|
|
for i in data_new[:20]:
|
|
f.write(i)
|
|
f.write("\n")
|