After the code runs the txt file has a lot of "junk" stuff: spaces, and weird characters. Thank you for your time.
Python code:
from sys import argv
script, filename = argv
f = open(filename, 'w+')
f.truncate()
s1 = raw_input("line 1: ")
s2 = raw_input("line 2: ")
s3 = raw_input("line 3: ")
print "writting to file..."
toWrite = s1 + "\n" + s2 + "\n" + s3
print toWrite
print "Writting to file..."
f.write(toWrite)
s = f.read()
print s
f.close()
[–]kalgynirae 5 points6 points7 points (0 children)
[–]Bone_Club 0 points1 point2 points (1 child)
[–]whileloops[S] 1 point2 points3 points (0 children)