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 {0}?".format(p)
时间: 2024-10-26 15:40:35