Python TypeError: can only concatenate str (not "list") to str 报错问题的解决

Traceback (most recent call last):
  File "1.py", line 37, in <module>
    print("Test Over,Now is test ID:"+list)
TypeError: can only concatenate str (not "list") to str

 

解决方法:用str()将list列表转换为字符形式再输出!

  

 PS:OK! 

参考:

TypeError: can only concatenate str (not "list") to str(列表和字符串的报错解决方法)_Keegan的博客-CSDN博客 

奶奶问孙子:4+1等于几 孙子说:等于6-1。 奶奶说:你明明知道答案,为什么不说? 孙子说:年轻人不讲5的……..
原文地址:https://www.cnblogs.com/jasy/p/13685763.html