HI,
sorry for asking i really tried but i couldn't know what should i do
When I run the following code:
from sys import argv
script, addingfile = argv[0],argv[1]
def print_all(k):
print k.read()
usingfile = open(addingfile, "r+")
usingfile.write("i want to make it write in the file then print the file")
print_all(usingfile)
print "Done!"
see the following result:
I tried changing the code to this:
from sys import argv
script, addingfile = argv[0], argv[1]
def print_all(k):
k.write("i want to make it write in the file then print the file")
print k.read()
usingfile = open(addingfile, "r+")
print_all(usingfile)
print "Done!"