python基础TypeError:not enough arguments for format string问题解决

359 阅读1分钟

在执行

print('%s,%d' %x %y)

的时候,出现了

将原来的代码改成

print('%s,%d',%(x,y))

之后,运行成功