Why this dont work?
>>> x=5 >>> console.write(x) Traceback (most recent call last): File "<console>", line 1, in <module> TypeError: object of type 'int' has no len()
Because console.write() takes a str (string), and x is an integer.
x=5 console.write(str(x))
will work.
Dave.
Log in to post a comment.
Why this dont work?
Because console.write() takes a str (string), and x is an integer.
will work.
Dave.