跟着别人的代码试的,结果报错了,如下
TypeError: not all arguments converted during string formatting
i=10
print('hello' % str(i))
跟着别人的代码试的,结果报错了,如下
TypeError: not all arguments converted during string formatting
i=10
print('hello' % str(i))
print('hello', str(i))
print(f'hello{str(i)}')
print('hello {}'.format(str(i)))