def writegushi(gushi):
f = open(“gushi.txt”, “w”, encoding=‘utf-8’)
for i in gushi:
f.write(i)
f.write("\n")
f.close()
def readfile():
f = open(“gushi.txt”, “r”, encoding=‘utf-8’)
copy1 = f.readlines()
f.close()
f = open(“copy.text”, “w”, encoding=‘utf-8’)
for i in copy1:
f.write(i)
f.close()
str = [“床前明月光”, “疑似地上霜”, “举头望明月”, “低头思故乡”]
writegushi(str)
readfile()