我在崇高编辑器中使用了这段代码
import glob2
from datetime import datetime
filenames = glob2.glob("*.txt")
with open(datetime.now().strftime("%Y-%m-%d-%H-%M-%S-%f")+".txt", 'w') as file:
for filename in filenames:
with open(filename, "r") as f:
file.write(f.read() + "\n")
我无法获得输出。任何人都可以阐明一下吗?