import shutil
shutil.copyfile("hello.py", "hello2.py") #hello.txt内容复制给hello2.txt
shutil.move("hello.py", "../") #hello.txt复制到当前目录的父目录,然后删除hello.txt
shutil.move("hell2.txt", "hello3.txt") #hello2.txt移到当前目录并命名为hello3.py, 然后删除hello2.txt2021-06-01 17:05:12 星期二