from sys import argv if len(argv) < 3: print("Usage: python copy.py donor recipient") quit() donor = argv[1] recipient = argv[2] fp_in = open(donor, "r") fp_out = open(recipient, "w") for line in fp_in: fp_out.write(line) fp_in.close() fp_out.close() ## copy file donor to recipient ## open the donor to read it. ## open the recipient for writing ## copy each line from the donor to the recipient ## ensure both files are closed at the end.