replacement
unknown
plain_text
a year ago
368 B
2
Indexable
Never
def list_replacement(lst,k,new_list): answer=[] new=[] for i in range (len(lst)): if lst[i]>k: lst[i]=new_list new+=lst[i] return new temp=[] for j in new: for z in j: temp.append(z) return temp return answer print(list_replacement([6,65,10,4,20],15,[1,2,3]))