13.用户输入的信息,如果出现了列表中的敏感词汇,请用*替代. li = ["苍老师","东京热","武藤兰","波多野结衣"] comment = input('请输入评论') new_li = [] for i in li: if i in comment: comment = comment.replace(i,'*') new_li.append(comment) print(new_li)…
检查获取传入列表或元组对象的所有奇数位索引对应的元素,并将其作为新列表返回给调用者. li = [11,22,33,44,55,66,77,88,99,000,111,222] def func1(lst): new_li = [] for i in range(0,len(lst),2): new_li.append(lst[i]) return new_li print(func1(li))…