Python Programming - Standard Libraries - Discussion
Discussion Forum : Standard Libraries - General Questions (Q.No. 73)
73.
How can you use the
shutil
module in Python to copy a file from one location to another?
Answer: Option
Explanation:
import shutil
# Example usage of shutil module for copying a file
source_path = 'file.txt'
destination_path = 'copy_of_file.txt'
shutil.copy(source_path, destination_path)
Discussion:
Be the first person to comment on this question !
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers