append VS extend

  • list1.append(list2) 向列表1中添加一个列表对象
  • list1.extend(list2) 把列表2的内容添加到列表1中
    python中append和extend
    但是extend不能传入int型
    python中append和extend

例1:
将列表展开:
python中append和extend

相关文章:

  • 2021-11-29
  • 2021-11-29
  • 2021-11-29
  • 2021-11-29
  • 2021-11-29
  • 2021-12-09
  • 2021-11-29
  • 2021-11-29
猜你喜欢
  • 2021-11-29
  • 2021-11-29
  • 2021-11-29
  • 2021-11-29
  • 2021-11-29
  • 2021-11-29
  • 2021-11-29
  • 2021-11-29
相关资源
相似解决方案