Do I need to convert string to integer in python?

Allerdyce.John at gmail.com Allerdyce.John at gmail.com
Sun Feb 26 14:55:54 EST 2006


Do I need to convert string to integer in python? or it will do it for
me (since dynamic type)?

In my python script, I have this line:
    x /= 10;

when i run it, I get this error:
TypeError: unsupported operand type(s) for /=: 'unicode' and 'int'

I want to divide x by 10 and assign that value back to x.

Thank you.




More information about the Python-list mailing list