Skip to content
This repository was archived by the owner on Sep 20, 2025. It is now read-only.

Latest commit

 

History

History
14 lines (11 loc) · 296 Bytes

File metadata and controls

14 lines (11 loc) · 296 Bytes
  • remove duplicates
old_lst = [...]
duplicate_indices = []

for i, _ in enumerate(new_lst)
	if any(is_same(new_lst, old_lst) for elem in old_lst)
		duplicate_indices.append(i)

def rm_by_index_inplace(list, indices):
    for i in sorted(indices, reverse=True):
        del list[i]