list1= ['b','b','c']list1.extend(['d','e','f'])print len(list1) # 6print list1 #['b','b','c','d','e','f']list2 = ['a','b','c']list2.append(['d','e','f'])print len(list2) # 4print list2 # ['a','b','c',['d','e','f']]
本文共 277 字,大约阅读时间需要 1 分钟。
list1= ['b','b','c']list1.extend(['d','e','f'])print len(list1) # 6print list1 #['b','b','c','d','e','f']list2 = ['a','b','c']list2.append(['d','e','f'])print len(list2) # 4print list2 # ['a','b','c',['d','e','f']]
转载于:https://my.oschina.net/012345678/blog/182298