Is it possible to use python's slicing to get all but some item of a given array?
meaning, for example,
arr = range(10)
print(slicing_magic(arr, 4))
would output
[0 1 2 3 5 6 7 8 9]
I realize this could be done with
def slicing_magic(arr, ind):
return arr[0:ind] + arr[ind+1:]
I wonder if there is a way without list addition, or
what is the most pythonic way?