I have a pretty strange problem with int()
Sometimes, even if it's really just numbers, I'm getting the error
"[...] In line 2: Invalid literal with Base 10: '' "
But the value is just a number (0) It's so strange... The following code causes this error:
count = open('count.dat', 'r')
cint = int(count.read)
cint = cint + 1
count.close()
del(count)
countw = open('count.dat', 'w+')
countw.write = str(cint)
countw.close()
del(countw)
PS: I'm a newbie