NEWBIE

Help
SDAVE
2012-06-29
2013-01-25
  • SDAVE
    SDAVE
    2012-06-29

    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.