Hi Alex,
as far as I understand your question one way would be to do it using strings; the substantial work is done by StringDelete:
StringDelete
string1 = StringJoin[ToString /@ list1]; string2 = StringJoin[ToString /@ list2]; ToExpression@Characters@StringDelete[string1, string2]
Does that meet your requirement? Regards -- Henrik
Hi Henrik,
Thank you so much. I used the "Drop" command for deleting a subset of numbers from the main list. Is it correct?
list1 = {6, 3, 8, 11, 20, 6, 14, 3, 0}; list2 = {14, 3, 0}; Drop[list1, -3] {6, 3, 8, 11, 20, 6}
with Drop[list1, -3] you simply drop the last 3 elements, list2 then is not necessary at all. This is a different task.
Drop[list1, -3]
list2