Question: python3 no imports are allowed! 6. destructiveRemoveRepeats(L) [10 pts] Important Note: this is the analog of the previous important note. Here, to receive any credit

 python3 no imports are allowed! 6. destructiveRemoveRepeats(L) [10 pts] Important Note:

this is the analog of the previous important note. Here, to receive

python3

no imports are allowed!

6. destructiveRemoveRepeats(L) [10 pts] Important Note: this is the analog of the previous important note. Here, to receive any credit for this problem, you may not simply call nondestructiveRemoveRepeats(L) and then somehow remove all the elements in L and then append the elements from that call. Instead, you must destructively modify the list as you go. Also, again, note that the autograder has no way to check this, so our TA's will check this manually after the hw deadline. Write the function destructiveRemoveRepeats(L), which implements the same function destructively. Thus, this function should directly modify the provided list to not have any repeating elements. Since this is a destructive function, it should not return any value at all (so, implicitly, it should return None). For example: L = [1, 3, 5, 3, 3, 2, 1, 7, 5] assert (destructiveRemoveRepeats (L) == None) assert(L == [1, 3, 5, 2, 7]) # destructive! == def testDestructiveRemoveRepeats(): print("Testing destructiveRemoveRepeats()...", end="") a = [1,3,5,3,3,2,1,7,5] assert (destructiveRemoveRepeats(a) None) assert(a == (1,3,5,2,7]) b = [1,2,3,-2] assert (destructiveRemoveRepeats(b) None) assert(b [1,2,3,-2]) print("Passed.") ==

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!