Sign in
Log inSign up

What will be the python equivalent of

DARK-KNIGHT-491's photo
DARK-KNIGHT-491
·Jan 3, 2018
File f1 = new File("C:\\music.mp3");
File f2 = new File("C:\\copied_file.mp3");
FileImageInputStream fileImageInputStream = new FileImageInputStream(f1);
FileImageOutputStream fileImageOutputStream = new FileImageOutputStream(f2);
int k = 0;
while(true){
    System.out.println("iteration:"+k++);
    if(f1.length()<f2.length())
    fileImageOutputStream.write(fileImageInputStream.read());
    else break;
}