"Eduardo Vieira" wrote
arq = open('c:/myscripts/simple2.ttt', 'w')
arq.write('The length is %d' % len(a))
res = arq.read()
print res
The print doesn't print the text I had written,
That's because of two things:
a) You opened the file for write only not reading
b) You had moved the file curs
Hello, I found interesting today, as I was playing with this code in the shell:
>>> arq = open('c:/myscripts/simple2.ttt', 'w')
>>> len(a)
9
>>> arq.write('The length is %d' % len(a))
>>> res = arq.read()
>>> print res
The print doesn't print the text I had written, but some thing else I
c