NEWBIE

Help
Anonymous
2012-06-29
2013-01-25
  • Anonymous - 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()
    
     
  • Dave Brotherstone

    Because console.write() takes a str (string), and x is an integer. 

    x=5
    console.write(str(x))
    

    will work.

    Dave.

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks