#移动文件 shutil.move(src_path, des_path)
import os filename = "path/to/file.txt" size = os.stat(filename).st_size print("文件大小为:", size, "字节") import os filename = "path/to/file.txt" size = os.path.getsize(filename) print("文件大小为:", size, "字节")