Question: . O . O O O . O append(self, value) Adds an item to the list after the last item set_at(self, value, index) Sets the

 . O . O O O . O append(self, value) Addsan item to the list after the last item set_at(self, value, index)

. O . O O O . O append(self, value) Adds an item to the list after the last item set_at(self, value, index) Sets the value at a specific location to a specific value Overwrites the current value there If the index is not within the current list, raise IndexOutOfBounds() get_first(self) Returns the first value in the list If there are no items in the list, raise Empty() get_at(self, index) Returns the value at a specific location in the list If the index is not within the current list, raise IndexOutOfBounds() get_last(self) Returns the last value in the list If there are no items in the list, raise Empty() resize(self) Re-allocates memory for a larger array and populates it with the original array's items remove_at(self, index) Removes from the list an item at a specific location If the index is not within the current list, raise IndexOutOfBounds() clear(self) Removes all items from the list O . o O . o O . O . o o o O o o o O Many things are not allowed: Calling a built-in function on the list class lis.append("some_string") lis.insert(i, 19) Sending the list directly into a built-in python function len(lis) print(lis) str(lis) Using ranges or negative integers in the bracket operator lis[1:] lis[0:10] lis[-1] Lis[1:-1] Using operators directly on the list lis3 = lis 1 + lis2 lis += [3,4] lis += "some_string" lis *= 2 although this is good for a quick-fix resize implementation it is not legal in a final implementation lis2 = lis 1 * 2 Using the join functionality in any way Using the in keyword or any other keyword directly on the list including for x in lis O o O o o 1 O o . O . O O O . O append(self, value) Adds an item to the list after the last item set_at(self, value, index) Sets the value at a specific location to a specific value Overwrites the current value there If the index is not within the current list, raise IndexOutOfBounds() get_first(self) Returns the first value in the list If there are no items in the list, raise Empty() get_at(self, index) Returns the value at a specific location in the list If the index is not within the current list, raise IndexOutOfBounds() get_last(self) Returns the last value in the list If there are no items in the list, raise Empty() resize(self) Re-allocates memory for a larger array and populates it with the original array's items remove_at(self, index) Removes from the list an item at a specific location If the index is not within the current list, raise IndexOutOfBounds() clear(self) Removes all items from the list O . o O . o O . O . o o o O o o o O Many things are not allowed: Calling a built-in function on the list class lis.append("some_string") lis.insert(i, 19) Sending the list directly into a built-in python function len(lis) print(lis) str(lis) Using ranges or negative integers in the bracket operator lis[1:] lis[0:10] lis[-1] Lis[1:-1] Using operators directly on the list lis3 = lis 1 + lis2 lis += [3,4] lis += "some_string" lis *= 2 although this is good for a quick-fix resize implementation it is not legal in a final implementation lis2 = lis 1 * 2 Using the join functionality in any way Using the in keyword or any other keyword directly on the list including for x in lis O o O o o 1 O o

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!