Ex 17 LPTHW "More Files...."

At this point I know my answer is here, I just need a nudge and little more guidance to lead me down the right path. I simply need to shorten this to nothing but one line of code.

When I run the code I get an AttributeError: etc… object has to attribute ‘from_file’???

from os.path import exists
from sys import argv
script, from_file, to_file = argv

if exists(to_file) == True:
   open(from_file).from_file.read().open(to_file, 'w').write(from_file).to_file.close().from_file.close()

Don’t close. Don’t do your if exists. Ditch all the .from_file, as that’s not available at that point. And, get this as close to 1 line as possible then move on. You’re going a little to insane on this one I think.