您的位置: 首页 > 文章 > python中append和extend python中append和extend 分类: 文章 • 2024-05-01 08:06:47 append VS extend list1.append(list2) 向列表1中添加一个列表对象 list1.extend(list2) 把列表2的内容添加到列表1中 但是extend不能传入int型 例1:将列表展开: