int()是Python的一个内部函数 Python系统帮助里面是这么说的 >>> help(int) Help on class int in module __builtin__: class int(object) | int(x[, base]) -> integer | | Convert a string or number to an integer, if possible. A floating point | argument will…
TypeError: cannot concatenate 'str' and 'int' objects 1. print 'Is your secret number " + str(p) + "?"2. print 'Is your secret number %d?"%p (for multiple integers, you can '%d %d %d'%(num1, num2, num3)3. print 'Is your secret number {…