Odoo Help

Welcome!

This community 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.

0

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]

By
samba
on 9/29/14, 7:16 AM 477 views

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

by
Ludo - Neobis
on 09/29/2014 07:40:43

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

l=67
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

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

 

 

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

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