Python Language Copia del contenuto di un file in un altro file

Esempio

with open(input_file, 'r') as in_file, open(output_file, 'w') as out_file:
    for line in in_file:
        out_file.write(line)
  • Usando il modulo shutil :
import shutil
shutil.copyfile(src, dst)