import shutil
argetdir_path = 'D:\\Python\\code\\PyQt\\1_study.py'
Targetfile_path = 'D:\\Python\\code\\2_study.py'
shutil.copyfile(argetdir_path, Targetfile_path)
The above code is to copy the file 1_study.py whose path is D: \ Python \ code \ PyQt \ 1_study.py to the path of D: \ Python \ code \ 2_study.py, and the copied file is called 2_study.py