python报错 can only concatenate str (not “int”) to str

Traceback (most recent call last):
  File "i:/pythonlearn/autoupload.py", line 47, in <module>
    print('剩余待发布数量' + len(file_list))
TypeError: can only concatenate str (not "int") to str

python在做拼接的时候,不能自动把类型转换为string类型;
需要进行类型转换,譬如将print(1+"a")改为print(str(1)+"a")就可以了;

所以上书面类型错误需要改为 print(‘剩余待发布数量’ + str(len(file_list)))