abh - HTMLify profile

abh's Profile Picture

abh

501 Files

101800 Views

Latest files of /abh/kkskc

Remove All Target from array with O(n) abh/kkskc/2.py
317 Views
0 Comments
def remove_target(target, array):
array = array.copy()
ofset = 0
for i in range(len(array)):
if array[i] != target:
array[ofset] = array[i]
ofset += 1
if i + ofset >= len(array)-1: