copy a file from one directroy to other using python

import shutil
shutil.copy2('https://cdn.myedukit.com/src/dir/file.ext', 'https://cdn.myedukit.com/dst/dir/newname.ext') # complete target filename given
shutil.copy2('https://cdn.myedukit.com/src/file.ext', '/dst/dir') # target filename is /dst/dir/file.ext

Here is what the above code is Doing:
1. shutil.copy2(‘/src/dir/file.ext’, ‘/dst/dir/newname.ext’)
This is copying the file.ext from the source directory to the destination directory. The destination directory is the same as the source directory, but with a different file name.

2. shutil.copy2(‘/src/file.ext’, ‘/dst/dir’)
This is copying the file.ext from the source directory to the destination directory. The destination directory is different from the source directory.