Question: PYTHON CODING BAT Return a version of the given array where all the 10's have been removed. The remaining elements should shift left towards the

PYTHON CODING BAT

Return a version of the given array where all the 10's have been removed. The remaining elements should shift left towards the start of the array as needed, and the empty spaces a the end of the array should be 0. So {1, 10, 10, 2} yields {1, 2, 0, 0}. You may modify and return the given array or make a new array.

without_ten([1, 10, 10, 2]) [1, 2, 0, 0]

without_ten([10, 2, 10]) [2, 0, 0]

without_ten([1, 99, 10]) [1, 99, 0]

def without_ten(nums):

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!