Write and test a function removeduplicatessomelist that


1. Write and test a function removeDuplicates(somelist) that removes duplicate values from a list.

2. One disadvantage of passing a function to the list sort method is that it makes the sorting slower, since this function is called repeatedly as Python needs to compare various items. An alternative to creating a special key function is to create a "decorated" list that will sort in the desired order using the standard Python ordering. For example, to sort Student objects by GPA, we could first create a list of tuples [(gpa0, Student0), (gpa1,Student1), ..] and then sort this list without passing a key function. These tuples will get sorted into GPA order. The resulting list can then be traversed to rebuild a list of student objects in GPA order. Redo the gpasort program using this approach.

Request for Solution File

Ask an Expert for Answer!!
Basic Computer Science: Write and test a function removeduplicatessomelist that
Reference No:- TGS01707752

Expected delivery within 24 Hours