Exercise 7: Delete an Element
Write code to delete an element from the array.
We'll cover the following
Problem statement
Delete one element from the given array to match this modification:
Before deletion:
input_array = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
element = 6
After deletion:
input_array = [1, 2, 3, 4, 5, 7, 8, 9, 10]
Note: Explore the documentation and use the appropriate method to delete the element from the array.
Create a free account to access the full course.
By signing up, you agree to Educative's Terms of Service and Privacy Policy