how to close a file after shutil in python code example Example: python copy file from shutil import copyfile copyfile(src, dst)