How do you remove an array from another array in Python?

 PythonIt is a popular programming language. It was created by Guido van Rossum, and released in 1991.

In this topic we will discuss about how to remove an array from another array in python.

Remove one array from another array using pop() and remove() function.

Both pop and remove function remove the element from an array.

In pop() function you have to pass an indices value but in remove function you have to pass an exact value(which value you want to remove from an array).


Example:

arr = [5,5,4,[5,6,7]]

arr.pop(3)
print(arr)

Output: 

[5, 5, 4]

# remove function 

arr = [5,6,7,9,[3,4,5]]
arr.remove([3,4,5])
print(arr)

Output: 

[5,6,7,9]

Comments

Popular posts from this blog

proassignment help backlink data index 41

Programming shark backlink data index 67

programming shark backink data index 31