<[EMAIL PROTECTED]> wrote: > Do I need to convert string to integer in python? or it will do it for > me (since dynamic type)?
Nope, no such implicit conversion (thanks be!). Strings are strings and ints and ints and never the twain shall meet, except by explicit request;-). > 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. If you want x to remain a Unicode string when you're done, x = unicode(int(x) / 10) should work. If you want x to become an integer, omit the unicode call around the int(x)/10 expression. Alex -- http://mail.python.org/mailman/listinfo/python-list