文件夹里有多个RM格式的视频文件,现需要把它们的文件名都提取出来,并去掉文件的扩展名,以便放到需要的网页里. 源代码: # --- picknames.py --- import os filenames=os.listdir(os.getcwd()) for name in filenames: filenames[filenames.index(name)]=name[:-3] out=open('names.txt','w') for name in filenames: out.writ…