0

I attempted to use the code below, but all I get is that I need exactly 1 argument, but I gave 0.

print "Copy one file into another:" print "Type first file here:" file1 = raw_input('>') openfile = open(file1).read() file2 = raw_input('>') open2file = open(file2, 'w') second = open2file.write() print "All Done" 
2
  • Henceforth please include the Traceback of the error. Commented Jul 22, 2015 at 18:01
  • 1
    the argument for write is whatever you want to put in the output file. open2file.write("this line goes in the file"). Commented Jul 22, 2015 at 18:03

1 Answer 1

3

It's open2file.write(openfile). This sends the content of the file you read into the opened file.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.