[Solved] Print string and integer in python [duplicate]
[ad_1] 1) Because there is not a clear, unambiguous meaning of str+int. Consider: x = “5” + 7 Should the + str-ify the 7 or int-ify the “5”? One way yields 12, the other yields “57”. 2) Because there are other alternatives that more clearly express the programmer’s intent: print “5”, 7 print “5%d” % … Read more