摘要: 博主在python算法学习中遇到insert函数问题。 目录 功能 格式及其解释 结果 运用 正文 功能: Python 列表 insert() 方法将指定对象插入到列表中的指定位置。 格式及其解释: list1.insert(i,list2(b)) list1:表示被插入的列表 i表示插入到lis 阅读全文
posted @ 2019-07-12 16:35 Accept_program 阅读(1869) 评论(0) 推荐(0) 编辑
摘要: 1 arr1 = [1,3,4,6,10] 2 arr2 = [2,5,8,11] 3 ind = 0 4 ans = arr1.copy() 5 #result[1,3,4,6,10] 6 print(ans) 7 for i in range(0,len(arr2)): 8 # range(0,4) i = 0 1 2 3 9 while ind < len... 阅读全文
posted @ 2019-07-12 16:19 Accept_program 阅读(113) 评论(0) 推荐(0) 编辑