Odoo Help


Why this small code (l=67 print "add l with 100 %d" % l+100) giving compatibility error? "Traceback (most recent call last): File "/home/samba/Desktop/a.py", line 2, in <module> print "add l with 100 %d" % l+100 TypeError: cannot concatenate 'str' and 'int' objects" [Closed]

on 9/29/14, 7:16 AM 646 views

The Question has been closed for reason: off-topic or not relevant

Ludo - 21South
on 09/29/2014 07:40:43

I am learning python,  why the below code giving error concatination error?

print "add 100 to l %d" % l+100

error: TypeError: cannot concatenate 'str' and 'int' objects"

It's showing print statement when i change the above code like this

print "add 100 to l %d" % int(l+100)



About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 9/29/14, 7:16 AM
Seen: 646 times
Last updated: 3/16/15, 8:10 AM