Copying and moving file are common operations in python, in this tutorial, we will introduce you an easy way to copy and move file with shutil library. shutil allow you copy and move files directly, you do not need open and close file before copying or moving.
import shutil shutil.copy(src, dst)
if this function is successful to copy, return dst.
import shutil shutil.move(src, dst)
Return dst if successful.
So if you want to copy or move a file, you only shoud provide a source file path and destination path.