list.extend(seq)
seq -- 这是元素的列表
#!/usr/bin/python3 list1 = ['physics', 'chemistry', 'maths'] list2=list(range(5)) #creates list of numbers between 0-4 list1.extend('Extended List :', list2) print (list1)
Extended List : ['physics', 'chemistry', 'maths', 0, 1, 2, 3, 4]
在线咨询
免费热线
资料发放
技术答疑
关注微信