Create a file in Python 3

0

I want to build a function in Python 3, which gets a name from a text file as a parameter and creates a new .txt file, named double.txt, which is the copy of the first one. How do I do this?

    
asked by anonymous 10.01.2018 / 16:03

1 answer

0
import shutil

shutil.copy2(src, dst)

src and dst are paths, where src is the current file and dst is the copy path of the file

Doc: shutil

Related Answer: stackoverflow

    
10.01.2018 / 17:27