当前位置: 代码迷 >> 综合 >> TypeError: can only concatenate list (not str) to list
  详细解决方案

TypeError: can only concatenate list (not str) to list

热度:61   发布时间:2023-12-26 19:50:36.0

类型错误: 只能将list类型和list类型联系起来,而不是str类型

 

出现上述类型错误:

    判断一下需要连接的两个变量的类型。

    如果是将str类型加入list用append添加,如果是移除用pop或remove

    

 

 

  相关解决方案